简体   繁体   中英

Owl carousel : change slide on hover dots

I´m using dots to navigate the owl carousel 2. I like to change the navigation from click to hover. So when I hover the second dot, the carousel jumps to the second slide. Couldn't find something like this in the documentation.

Are there any easy solutions for this?

The easiest solution would be something like this:

$('.own-carousel .dot').hover(function() {
    $(this).click();
}, function() {});

This simply triggers the click events on hover. I am not sure about the classes own-carousel and dot , better check those.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM