Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Nivo-slider to start before all images are loaded

I am using the Nivo-slider Wordpress plugin, and love how it looks and how easy it is for my clients to use.

The only problem is that the slideshows do not play until all the images are loaded, which is a big problem as soon as you have more than a few images: http://www.marcusmcshane.com/

Does anyone know how to make the slideshow start after the first couple have loaded?

Thanks in advance for any help you can offer.

like image 200
Caroline Elisa Avatar asked Dec 06 '22 20:12

Caroline Elisa


1 Answers

Having had plenty of experience with Nivo Slider personally, I remember that they use $(window).load which I indeed saw you are still using too.

Change this:

<script type="text/javascript"> 
jQuery(window).load(function(){
    jQuery("#nivoslider-283").nivoSlider({
        effect:"fade",
        slices:15,
        boxCols:8,
        boxRows:4,
        animSpeed:500,
        pauseTime:3000,
        startSlide:0,
        directionNav:false,
        directionNavHide:true,
        controlNav:false,
        keyboardNav:true,
        pauseOnHover:true,
        manualAdvance:false
    });
});
</script>

to this:

<script type="text/javascript"> 
jQuery(function(){
    jQuery("#nivoslider-283").nivoSlider({
        effect:"fade",
        slices:15,
        boxCols:8,
        boxRows:4,
        animSpeed:500,
        pauseTime:3000,
        startSlide:0,
        directionNav:false,
        directionNavHide:true,
        controlNav:false,
        keyboardNav:true,
        pauseOnHover:true,
        manualAdvance:false
    });
});
</script> 
like image 73
daryl Avatar answered May 23 '23 03:05

daryl