jQuery(function($){ var owl = $("#carousel-product-546"); $(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-546').find('.owl-item').length; if( slider_count < 4 ){ $('.next-546').addClass('disabled'); $('.prev-546').addClass('disabled'); } else { $('.next-546').removeClass('disabled'); $('.prev-546').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-546").click(function(){ owl.trigger('owl.next'); }) $(".prev-546").click(function(){ owl.trigger('owl.prev'); }) }); });

Showing 1–10 of 154 results