jQuery(function($){ var owl = $("#carousel-product-7531"); $(document).ready(function(){ owl.owlCarousel({ items : 4, pagination: false, itemsDesktopSmall: [979,3], itemsTablet: [768,2], itemsMobile: [481,1], afterAction : afterAction }); function afterAction (slider_count) { var slider_count = $('#carousel-product-7531').find('.owl-item').length; if( slider_count < 4 ){ $('.next-7531').addClass('disabled'); $('.prev-7531').addClass('disabled'); } else { $('.next-7531').removeClass('disabled'); $('.prev-7531').removeClass('disabled'); } } if( $(window).width() < 480 ){ $('.product-slider-sc li').each(function() { var _this = $(this); _this.css({'width':'auto'}); }); } else { $('.product-slider-sc li').each(function() { var _this = $(this); var parentW = $('.owl-item').width() - 30; _this.width(parentW); _this.css({'padding':'0 15px'}); }); } // Custom Navigation Events $(".next-7531").click(function(){ owl.trigger('owl.next'); }) $(".prev-7531").click(function(){ owl.trigger('owl.prev'); }) }); });

Showing 1–10 of 154 results