1$(document).on('click', '.slide_button', function () { 2 var width_menu = $('.slide_menu').width(); 3 4 if ($('.slide').hasClass('slide_left')) 5 { 6 $('body').css('overflow-x', 'none'); 7 $('.slide').animate({left: '0px'}, "slow", function () { 8 $('.slide').removeClass('slide_left'); 9 $('.slide_menu').css('left', '-' + width_menu + 'px'); 10 }); 11 } 12 else 13 { 14 $('body').css('overflow-x', 'hidden'); 15 $('.slide_menu').css('left', '0').css('height', $(document).height() + 'px'); 16 $('.slide').addClass('slide_left'); 17 $('.slide').animate({left: width_menu + 'px'}, "slow", function () { 18 }); 19 } 20}); 21 22 23diafan_ajax.success['shop_wish'] = function(form, response) { 24 var self = form.parents('.js_shop').find('.shop-like'); 25 if(! response.is_wish) 26 { 27 self.removeClass("active").removeClass("animate") 28 self.children('i').removeClass("fa-heart") 29 self.children('i').addClass("fa-heart-o") 30 } 31 else 32 { 33 self.addClass("animate"); 34 self.children('i').removeClass("fa-heart-o") 35 self.children('i').addClass("fa-heart") 36 setTimeout(function () { 37 self.addClass("active") 38 }, 50); 39 } 40} 41/* 42$(document).on('click', ".shop-like", function (e) { 43 var self = this; 44 if ($(this).hasClass("active")) { 45 $(this).removeClass("active").removeClass("animate") 46 $(this).children('i').removeClass("fa-heart") 47 $(this).children('i').addClass("fa-heart-o") 48 } 49 else { 50 $(this).addClass("animate"); 51 $(this).children('i').removeClass("fa-heart-o") 52 $(this).children('i').addClass("fa-heart") 53 setTimeout(function () { 54 $(self).addClass("active") 55 }, 50); 56 } 57 ; 58}); 59*/ 60 61var init_items_scroller = function() { 62 $(".items-scroller").each(function (index, element) { 63 64 var time = 700; 65 var itemsPane = $(this); 66 var itemPerScreen = itemsPane.data("item-per-screen"); 67 var controls = itemsPane.data("controls"); 68 69 if (!itemPerScreen) 70 itemPerScreen = 5; 71 72 var currentItem = 0; 73 var totalItems = $(this).find(".item").length; 74 75 //next 76 $(".control-next" + "." + controls).click(function (e) { 77 e.preventDefault(); 78 currentItem = currentItem + itemPerScreen; 79 if (currentItem > totalItems - 1 || totalItems - 1 - currentItem < itemPerScreen) 80 currentItem = totalItems - 1; 81 itemsPane.scrollTo('.item:eq(' + currentItem + ')', time) 82 }); 83 84 //prev 85 $(".control-prev" + "." + controls).click(function (e) { 86 e.preventDefault(); 87 if (currentItem == totalItems - 1) 88 currentItem = currentItem - itemPerScreen * 2 + 1; 89 else 90 currentItem = currentItem - itemPerScreen; 91 92 if (currentItem <= 0) { 93 currentItem = 0; 94 itemsPane.scrollTo(0, time) 95 } 96 else 97 itemsPane.scrollTo('.item:eq(' + currentItem + ')', time) 98 99 }); 100 101 102 }); 103} 104 105var init_mp_slider = function() { 106 var delay = 4000; 107 108 var slides = $("#mp-slider .slide");
109 var dotsContainer = $('<div class="dots-container"> </div>'); 110 $("#mp-slider").append(dotsContainer); 111 112 slides.each(function (index, element) { 113 var dot = $('<span class="dot"> </div>'); 114 dotsContainer.append(dot); 115 dot.click(function (e) { 116 if (slideShowInterval) 117 clearInterval(slideShowInterval); 118 showSlide(index); 119 }); 120 121 }); 122 123 var dots = $("#mp-slider .dots-container .dot"); 124 dots.eq(0).addClass("active"); 125 slides.eq(0).addClass("active"); 126 127 var slideShowInterval = setInterval(function () { 128 var n = $("#mp-slider .slide.active").next().index(); 129 if (n > slides.length - 1) 130 n = 0; 131 showSlide(n); 132 133 }, delay) 134 135 function showSlide(n) { 136 slides.removeClass("active"); 137 dots.removeClass("active"); 138 slides.eq(n).addClass("active"); 139 dots.eq(n).addClass("active"); 140 } 141 142 function showNext() { 143 echo($("#mp-slider .slide.active").next().index()); 144 145 } 146} 147 148function init_main() 149{ 150 if(init_items_scroller && typeof window["init_items_scroller"] == 'function' && $(".items-scroller").length) 151 { 152 window.init_items_scroller(); 153 window.init_items_scroller = null; 154 } 155 if(init_mp_slider && typeof window["init_mp_slider"] == 'function' && $("#mp-slider").length) 156 { 157 window.init_mp_slider(); 158 window.init_mp_slider = null; 159 } 160} 161 162init_main(); 163 164$(document).ready(function (e) { 165 166 //$(".shop-row .shop-item:nth-child(3n-2)").addClass("first"); /* Хак Ð´Ð»Ñ IE8, коÑоÑÑй не Ð¿Ð¾Ð½Ð¸Ð¼Ð°ÐµÑ nth-child */ 167 168}); 169 170/* 171 * 172 * ÐнÑÑÑÑÐ¼ÐµÐ½Ñ Ð¾Ñладки. Ð¡Ð¾Ð·Ð´Ð°ÐµÑ Ð¾ÐºÐ¾Ñко, в коÑоÑое вÑÐ²Ð¾Ð´Ð¸Ñ Ð´Ð°Ð½Ð½Ñе. 173 */ 174 175function echo(text) { 176 var debugWindow = $("#debug-window"); 177 if (!debugWindow.length) { 178 debugWindow = $('<div id="debug-window"></div>'); 179 $("body").append($('<div id="debug-window-container"></div>').append(debugWindow)).append("<style>\ 180 #debug-window-container{ \ 181 position: fixed; \ 182 right: 10px; \ 183 bottom:0px; \ 184 width: 390px; \ 185 height: 200px; \ 186 z-index: 100000;\ 187 background-color: #000; \ 188 display: table-cell; \ 189 padding: 20px; \ 190 overflow:scroll; \ 191 } \ 192 \ 193 \ 194 #debug-window {\ 195 position:absolute;\ 196 bottom:0;\ 197 padding:20px;\ 198 }\ 199 \ 200 </style>"); 201 } 202 $("#debug-window").append(text + "<br>"); 203} 204 205 206function getRandomInt(min, max) { 207 return Math.floor(Math.random() * (max - min + 1)) + min; 208} 209 210$(document).ready(function() { 211 $('.calculation-comment textarea').on('input', function() { 212 let text = $(this).val(); 213 $('input[name="p31"]').val(text); 214 }); 215});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.