You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for this plugin.
I'd like to make the slideshow run automatically. I wanted to use the .next() method with a timeout but I'm unable to make the equivalent of JQuery data() (like in your example : $elements.data().lory.next();) in vanilla JS. Any idea? And maybe that could be a future improvement to have an auto slideshow option.
Thank you !
Cédric
The text was updated successfully, but these errors were encountered:
var el = document.getElementById('#slider');
var slider = lory(el, options);
var timeout;
var triggerAutoSlide = function () {
timeout = setTimeout(function () {
slider.next();
}, 300 + 3000); // transition time + delay time
}
triggerAutoSlide(); // trigger after init
el.addEventListener('after.lory.slide', function () {
clearTimeout(timeout);
triggerAutoSlide();
});
Le 20 mars 2020 à 03:39, Long Đoàn ***@***.***> a écrit :
You could use something like this:
var el = document.getElementById('#slider');
var slider = lory(el, options);
var timeout;
var triggerAutoSlide = function () {
timeout = setTimeout(function () {
slider.next();
}, 300 + 3000); // transition time + delay time
}
triggerAutoSlide(); // trigger after init
el.addEventListener('after.lory.slide', function () {
clearTimeout(timeout);
triggerAutoSlide();
});
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#771 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANA2OCYGO5ITPYM2ZWZIZY3RILJP7ANCNFSM4JSWRZLA>.
Hi, thanks for this plugin.
I'd like to make the slideshow run automatically. I wanted to use the .next() method with a timeout but I'm unable to make the equivalent of JQuery data() (like in your example : $elements.data().lory.next();) in vanilla JS. Any idea? And maybe that could be a future improvement to have an auto slideshow option.
Thank you !
Cédric
The text was updated successfully, but these errors were encountered: