1$(document).ready(function() { 2 var $cateproductsSlideConf = $('.category-products-slider'); 3 var items = parseInt($cateproductsSlideConf.attr('data-items')); 4 var speed = parseInt($cateproductsSlideConf.attr('data-speed')); 5 var autoPlay = parseInt($cateproductsSlideConf.attr('data-autoplay')); 6 var time = parseInt($cateproductsSlideConf.attr('data-time')); 7 var arrow = parseInt($cateproductsSlideConf.attr('data-arrow')); 8 var pagination = parseInt($cateproductsSlideConf.attr('data-pagination')); 9 var move = parseInt($cateproductsSlideConf.attr('data-move')); 10 var pausehover = parseInt($cateproductsSlideConf.attr('data-pausehover')); 11 var lg = parseInt($cateproductsSlideConf.attr('data-lg')); 12 var md = parseInt($cateproductsSlideConf.attr('data-md')); 13 var sm = parseInt($cateproductsSlideConf.attr('data-sm')); 14 var xs = parseInt($cateproductsSlideConf.attr('data-xs')); 15 var xxs = parseInt($cateproductsSlideConf.attr('data-xxs')); 16 17 if(autoPlay==1) { 18 if(time){ 19 autoPlay = time; 20 }else{ 21 autoPlay = '3000'; 22 } 23 }else{ 24 autoPlay = false; 25 } 26 if(pausehover){pausehover = true}else{pausehover=false} 27 if(move){move = false}else{move=true} 28 if(arrow){arrow =true}else{arrow=false} 29 if(pagination==1){pagination = true}else{pagination=false} 30 31 var cateproductsSlider = $(".category-products-slider .productCategorySlider"); 32 cateproductsSlider.owlCarousel({ 33 autoplay : autoPlay , 34 smartSpeed: speed, 35 autoplayHoverPause: pausehover, 36 addClassActive: true, 37 scrollPerPage: move, 38 nav : arrow, 39 dots : pagination, 40 responsiveClass:true, 41 lazyLoad:true, 42 responsive:{ 43 0:{ 44 items:xxs, 45 }, 46 360:{ 47 items:xxs, 48 }, 49 576:{ 50 items:sm, 51 }, 52 768:{ 53 items:md, 54 }, 55 992:{ 56 items:lg, 57 }, 58 1200:{ 59 items:items, 60 } 61 } 62 }); 63 checkClasses(); 64 cateproductsSlider.on('translated.owl.carousel', function(event) { 65 checkClasses(); 66 }); 67 68 function checkClasses(){ 69 $('.category-products-slider .category_products').each(function(){ 70 var total = $(this).find('.owl-stage .owl-item.active').length; 71 $(this).find('.owl-item').removeClass('firstActiveItem'); 72 $(this).find('.owl-item').removeClass('lastActiveItem'); 73 $(this).find('.owl-item.active').each(function(index){ 74 if (index === 0) { $(this).addClass('firstActiveItem'); } 75 if (index === total - 1 && total>1) { 76 $(this).addClass('lastActiveItem'); 77 } 78 }) 79 }); 80 } 81 82}); 83
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.