Is it possible or not to move the OwlCarousel 2 navigation to blocks with other classes, or to another block?
1 answer
Disable the standard navigation and hang triggers on those elements that will be required:
var owl = $('.owl-carousel'); owl.owlCarousel(); $('.customNextBtn').click(function() { owl.trigger('next.owl.carousel'); }) $('.customPrevBtn').click(function() { owl.trigger('prev.owl.carousel', [300]); // в квадратных скобках скорость переключения }) From official documentation: https://owlcarousel2.imtqy.com/OwlCarousel2/docs/api-events.html
- Thank you very much! You are the best! - Pavlyshyn Andriy
|