Owl Trigger

PHOTO EMBED

Tue Mar 01 2022 03:40:56 GMT+0000 (Coordinated Universal Time)

Saved by @deveseospace #javascript

<div class="custom-nav owl-nav">
<button class="btn" id="prevBtn"><i class="fa fa-chevron-left"></i></button>
<button class="btn" id="nextBtn"><i class="fa fa-chevron-right"></i></button>
</div>

<script>
jQuery(document).ready(function() {
    var owl = jQuery('.info-box-carousel');
    
    // Assuming that owl is initiated already. OR we initiate here below.
    // owl.owlCarousel();


    // Go to the next item
    jQuery('#nextBtn').click(function() {
        owl.trigger('next.owl.carousel');
    })
    // Go to the previous item
    jQuery('#prevBtn').click(function() {
        // With optional speed parameter
        // Parameters has to be in square bracket '[]'
        owl.trigger('prev.owl.carousel', [300]);
    })
})
</script>
content_copyCOPY