dimanche 19 avril 2015

Hide custom navigation buttons if carousel has less items to show - Owl Carousel

I am using owl carousal on one of the pages and i am using following script from theme unify http://ift.tt/1DCe1Y6


I want to hide the navigation buttons when carousel has less items to show even in responsive mode something similar to what has been done in this example http://ift.tt/1H6uqYH, in this codepen example button hide based on items visible in different screen sizes.


I tried to implement same to the carousal but it is not working for me


fiddle http://ift.tt/1Iw4VgL



//Owl Slider v1
var owl = jQuery(".owl-slider").owlCarousel({
itemsDesktop : [1000,5],
itemsDesktopSmall : [900,4],
itemsTablet: [600,3],
itemsMobile : [479,2],
});
jQuery(".next-v1").click(function(){
owl.trigger('owl.next');
})
jQuery(".prev-v1").click(function(){
owl.trigger('owl.prev');
})

Aucun commentaire:

Enregistrer un commentaire