$.put = function(url, data, callback, type){
if ( $.isFunction(data) ){
type = type || callback,
callback = data,
data = {}
}
return $.ajax({
url: url,
type: 'PUT',
success: callback,
data: data,
contentType: type
});
};
$('#photoimg').die('click').live('change', function() {
var files = this.files;
if (files.length > 5) {
console.log("Вы превысили лимит на кол-во файлов!");
return;
}
//Далее идет ваш код
});
this.beforeRemoving(sticked).then(function (response) {
//тут что-то делаем
});
tinymce.init({
selector: "textarea",
statusbar: false,
setup: function (editor) {
editor.on('change', function () {
tinymce.triggerSave();
});
}
});
var text = $('textarea).val();
$(function () {
var fotorama = $('.fotorama')
.fotorama({allowfullscreen: true})
.data('fotorama');
fotorama.requestFullScreen();
});
<div class="fotorama"
data-auto="false"
data-height="100%">
<img src="1.jpg">
<img src="2.jpg">
</div>
@keyframes fon {
0% {
background-color: red;
}
30% {
background-color: blue;
}
60% {
background-color: yellow;
}
100% {
background-color: green;
}
}
var array = [["55.7852","37.7155"],["55.7039","37.8454"],["55.7947","37.5919"]], ln = array.length;
for(var i = 0; i< ln; i++) {
var loc = array[i];
console.log(loc[0] + '||' + loc[1]);
}
bn = $(bg).find(".b1c-name").html().length;
bg = $(".b1c-good").length == 0 ? $("body") : $(this).closest(".b1c-good");
var obj = {a: 5, b: 3};
var newObj = update(obj, {$merge: {b: 6, c: 7}}); // => {a: 5, b: 6, c: 7}
$(function(){
$('textarea').on('keypress',function(event){
var text = $('textarea').val();
var lines = text.split("\n");
var currentLine = this.value.substr(0, this.selectionStart).split("\n").length;
console.log(lines);
console.log(currentLine);
console.log(lines[currentLine-1]);
if(event.keyCode == 13) {
if (lines.length >= $(this).attr('rows'))
return false;
}
else{
if(lines[currentLine-1].length >= $(this).attr('cols')) {
if (lines.length <= $(this).attr('rows') - 1) {
$(this).val(text + '\n');
} else {
return false;
}
}
}
});
});
/*global console*/
var greet = 'Hello';
function say() {
"use strict";
return function (name) {
return greet + " " + name;
};
}
var en = say();
console.log(say("John"));
console.log(say("Martin"));
$(document).ready(function () {
var hash = window.location.hash;
if (hash === "#myNameModal") {
$('#myModal').modal(options);
}
});
$res = json_decode($result, true);
if ($res['success']) {
for($i = 0; $i < $res['totalNumRows']; $i++) {
$elem = $res['data'][$i]; //$elem и есть ваши данные далее делайте с ними что хотите
echo $elem['clicks'];//Выводим клики
}
} else {
//Тут обработка если получил false
}
<video autoplay poster="test.jpg" id="vidos">
<source src="test.mp4" type="video/mp4">
</video>
#vidos {
position: fixed;
right: 0;
bottom: 0;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -1;
background: url(test.jpg) no-repeat;
background-size: cover;
}
.wrapper {
width: 100%;
height: 100%;
background: linear-gradient(to right, green 50%, red 50%);
}
<div class="wrapper">
<div class="left_block">
</div>
<div class="right_block">
<main>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<section class="box">
<h1>TEXT</h1>
</section>
<div class="clear"></div>
</main>
</div>
</div>
html, body{
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
.wrapper{
min-height: 100%;
width: 100%;
background: grey;
}
.left_block{
width: 250px;
height: 100%;
float: left;
}
.right_block{
width: auto !important;
min-height: 100%;
background: gold;
margin-left: 250px;
}
.box{
width: 220px;
height: 170px;
float: left;
margin: 10px;
background-color: silver;
padding: 15px;
}
.clear {
clear: both;
}