I have a page that displays multiple Royalslider slideshows, each at 100% width and height. Currently, all the slideshows initialise on page load, meaning that I only see the first slider fade into place (they are all supposed to fade in, but the first one is the only one visible to see this effect).
I am also using Scrollify to snap to each section, but I'm not sure if this is relevent or not, as I think I need to adjust the below script to literally only initialise the slideshows upon coming into viewport.
Any help would be greatly appreciated!
HTML
<section >
<div class="slideshow royalSlider">
<div class="rsContent">Slider content here</div>
</div>
</section>
<section >
<div class="slideshow royalSlider">
<div class="rsContent">Slider content here</div>
</div>
</section>
<section >
<div class="slideshow royalSlider">
<div class="rsContent">Slider content here</div>
</div>
</section>
JS
jQuery(document).ready(function($) {
$('.slideshow').royalSlider({
transitionType: 'move',
randomizeSlides: false,
imageScaleMode: 'fill'
});
});
// Scrollify (snap to section)
$(function() {
$.scrollify({
section : "section",
easing: "easeOutExpo",
scrollSpeed: 1000,
scrollbars: true,
before:function() {},
after:function() {}
});
$(".scroll-down").click(function(e) {
e.preventDefault();
$.scrollify.next();
});
});