autoplay on fullscreen slider
-
Hi there, is autoplay possible on Fullscreen Slider? Perhaps with some custom css? Thank you.
-
kalamakumaranreplied to minutes on Aug 15, 2023, 9:17 AM last edited by kalamakumaran Aug 15, 2023, 5:17 AM
if you are using the vertical direction of the fullscreen slider put this in Custom <head> content
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj){ slideTimeout = setInterval(function () { jQuery.fn.fullpage.moveSectionDown(); }, 10000); }); </script>
-
@kalamakumaran thanks a lot for your response! What about if the direction is horizontal? I'd like to keep it horizontal because of some other settings I'm using.
-
try this. haven't tested it. maybe it works ;)
<script> window.laytheme.on("newpageshown", function(layoutObj, type, obj) { var slideTimeout; function moveHorizontalSection() { var activeSection = jQuery.fn.fullpage.getActiveSection(); var nextSection = activeSection.index() + 1; if (nextSection <= jQuery.fn.fullpage.getSections().length) { jQuery.fn.fullpage.moveTo(nextSection, 0); } else { jQuery.fn.fullpage.moveTo(1, 0); } } slideTimeout = setInterval(moveHorizontalSection, 10000); }); </script>
-
@kalamakumaran thank you for that – I did try but it didn't work for me unfortunately. If you have any other tips or tricks that would be greatly appreciated. Thanks again!
-
Pm!
-
arminunruh Global Moderatorwrote on Aug 16, 2023, 10:43 AM last edited by arminunruh Aug 16, 2023, 6:43 AM
<script> window.laytheme.on("newpageshown", function(){ setInterval(function () { jQuery.fn.fullpage.moveSlideRight(); }, 10000); }); </script>
-
Ah Great. Didn‘t know the sections are adressed as slides when using horizontal direction. Easy ;)
-
@arminunruh Thanks a lot Armin, this works! :)
-
This post is deleted!
Need custom programming for your Lay Theme site?
I regularly add new features to Lay Theme for free, based on user feedback. But if you or your client need something more specific, I’m happy to offer custom paid programming tailored to your project.
Email info@laytheme.com with the subject "Custom paid programming for Lay Theme" and a short description of what you need — I’ll reply with a cost estimate.
Custom features I build often make it into future Lay Theme updates, so your idea might benefit the whole community.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it