1$(window).scroll(function() { 2 var stickyTop = $('.sticky-top').height(); 3 if( $(this).scrollTop() > stickyTop ) { 4 $(".sticky-top").addClass("sticky-header"); 5 } else { 6 $(".sticky-top").removeClass("sticky-header"); 7 } 8}); 9 10 11$(document).ready(function () { 12 var itemsMainDiv = ('.MultiCarousel'); 13 var itemsDiv = ('.MultiCarousel-inner'); 14 var itemWidth = ""; 15 16 $('.leftLst, .rightLst').click(function () { 17 var condition = $(this).hasClass("leftLst"); 18 if (condition) 19 click(0, this); 20 else 21 click(1, this) 22 }); 23 24 ResCarouselSize(); 25 $(window).resize(function () { 26 ResCarouselSize(); 27 }); 28 29 //this function define the size of the items 30 function ResCarouselSize() { 31 var incno = 0; 32 var dataItems = ("data-items"); 33 var itemClass = ('.item'); 34 var id = 0; 35 var btnParentSb = ''; 36 var itemsSplit = ''; 37 var sampwidth = $(itemsMainDiv).width(); 38 var bodyWidth = $('body').width(); 39 $(itemsDiv).each(function () { 40 id = id + 1; 41 var itemNumbers = $(this).find(itemClass).length; 42 btnParentSb = $(this).parent().attr(dataItems); 43 itemsSplit = btnParentSb.split(','); 44 $(this).parent().attr("id", "MultiCarousel" + id); 45 46 47 if (bodyWidth >= 1200) { 48 incno = itemsSplit[3]; 49 itemWidth = sampwidth / incno; 50 } 51 else if (bodyWidth >= 992) { 52 incno = itemsSplit[2]; 53 itemWidth = sampwidth / incno; 54 } 55 else if (bodyWidth >= 768) { 56 incno = itemsSplit[1]; 57 itemWidth = sampwidth / incno; 58 } 59 else { 60 incno = itemsSplit[0]; 61 itemWidth = sampwidth / incno; 62 } 63 $(this).css({ 'transform': 'translateX(0px)', 'width': itemWidth * itemNumbers }); 64 $(this).find(itemClass).each(function () { 65 $(this).outerWidth(itemWidth); 66 }); 67 68 $(".leftLst").addClass("over"); 69 $(".rightLst").removeClass("over"); 70 71 }); 72 } 73 74 75 //this function used to move the items 76 function ResCarousel(e, el, s) { 77 var leftBtn = ('.leftLst'); 78 var rightBtn = ('.rightLst'); 79 var translateXval = ''; 80 var divStyle = $(el + ' ' + itemsDiv).css('transform'); 81 var values = divStyle.match(/-?[\d\.]+/g); 82 var xds = Math.abs(values[4]); 83 if (e == 0) { 84 translateXval = parseInt(xds) - parseInt(itemWidth * s); 85 $(el + ' ' + rightBtn).removeClass("over"); 86 87 if (translateXval <= itemWidth / 2) { 88 translateXval = 0; 89 $(el + ' ' + leftBtn).addClass("over"); 90 } 91 } 92 else if (e == 1) { 93 var itemsCondition = $(el).find(itemsDiv).width() - $(el).width(); 94 translateXval = parseInt(xds) + parseInt(itemWidth * s); 95 $(el + ' ' + leftBtn).removeClass("over"); 96 97 if (translateXval >= itemsCondition - itemWidth / 2) { 98 translateXval = itemsCondition; 99 $(el + ' ' + rightBtn).addClass("over"); 100 } 101 } 102 $(el + ' ' + itemsDiv).css('transform', 'translateX(' + -translateXval + 'px)'); 103 } 104 105 //It is used to get some elements from btn 106 function click(ell, ee) { 107 var Parent = "#" + $(ee).parent().attr("id"); 108 var slide = $(Parent).attr("data-slide"); 109 ResCarousel(ell, Parent, slide); 110 } 111 if( $(window).width() >= 767){ 112 setTimeout(function(){ 113 $calheight = $("#product_images .carouselimages .carousel-item.active").height(); 114 $("#product_images .carousel-thumbs").css("max-height", $calheight); 115 },500); 116 $("#product_images").bind('slid.bs.carousel', function () { 117 $calheight = $("#product_images .carouselimages .carousel-item.active").height(); 118 $("#product_images .carousel-thumbs").css("max-height", $calheight); 119 }); 120 } 121 122 123 jQuery(document).ready(function() { 124 /* partner slider */ 125 $('.product_details_slider_one').slick({ 126 dots: false, 127 infinite: true, 128 autoplay: true, 129 speed: 500, 130 slidesToShow: 3, 131 slidesToScroll: 1, 132 autoplaySpeed: 5000, 133 responsive: [{ 134 breakpoint: 1199, 135 settings: { 136 slidesToShow: 4, 137 slidesToScroll: 1 138 } 139 }, 140 { 141 breakpoint: 991, 142 settings: { 143 slidesToShow: 3, 144 slidesToScroll: 1 145 } 146 }, 147 { 148 breakpoint: 768, 149 settings: { 150 slidesToShow: 2, 151 slidesToScroll: 1 152 } 153 }, 154 { 155 breakpoint: 480, 156 settings: { 157 slidesToShow: 1, 158 slidesToScroll: 1 159 } 160 } 161 ] 162 }); 163 }); 164 165 jQuery(document).ready(function() { 166 /* partner slider */ 167 $('.product_details_slider_two').slick({ 168 dots: false, 169 infinite: true, 170 autoplay: true, 171 speed: 500, 172 slidesToShow: 4, 173 slidesToScroll: 1, 174 autoplaySpeed: 5000, 175 responsive: [{ 176 breakpoint: 1199, 177 settings: { 178 slidesToShow: 4, 179 slidesToScroll: 1 180 } 181 }, 182 { 183 breakpoint: 991, 184 settings: { 185 slidesToShow: 3, 186 slidesToScroll: 1 187 } 188 }, 189 { 190 breakpoint: 768, 191 settings: { 192 slidesToShow: 2, 193 slidesToScroll: 1 194 } 195 }, 196 { 197 breakpoint: 480, 198 settings: { 199 slidesToShow: 1, 200 slidesToScroll: 1 201 } 202 } 203 ] 204 }); 205 206 }); 207 208 209 210 $(".slider-cat").slick({ 211 autoplay: true, 212 infinite: true, 213 slidesToShow: 4, 214 slidesToScroll: 1, 215 arrows: true, 216 pauseOnFocus : false, 217 responsive: [ 218 { 219 breakpoint: 1199, 220 settings: { 221 slidesToShow:2, 222 slidesToScroll: 2, 223 infinite: true, 224 } 225 }, 226 { 227 breakpoint: 600, 228 settings: { 229 slidesToShow: 2, 230 slidesToScroll: 2 231 } 232 }, 233 { 234 breakpoint: 480, 235 settings: { 236 slidesToShow: 1, 237 slidesToScroll: 1 238 } 239 } 240 241 ] 242 }); 243});
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.