• Resolved sandrinebud

    (@sandrinebud)


    I’m using owl carousel, which is working fine.
    But my client is now asking that the user should be also able to scroll horizontally (as well as drag).
    I found this script that works with OwlCarousel:
    https://owlcarousel2.github.io/OwlCarousel2/demos/mousewheel.html

    But I don’t know how to implement it in WP for it to work with your plugin.
    Can you help?
    Thanks !

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter sandrinebud

    (@sandrinebud)

    Solved my problem.
    Just add the code shown in example.
    I just forgot to declare the variable at the start.

    var owl = $(‘.owl-carousel’);
    owl.on(‘mousewheel’, ‘.owl-stage’, function (e) {
    if (e.deltaY>0) {
    owl.trigger(‘next.owl’);
    } else {
    owl.trigger(‘prev.owl’);
    }
    e.preventDefault();
    });

Viewing 1 replies (of 1 total)
  • The topic ‘Using Mousewheel with Owl’ is closed to new replies.