在加载所有图像之前启动Nivo滑块 [英] Getting Nivo-slider to start before all images are loaded
问题描述
我正在使用Nivo-slider Wordpress插件,并且喜欢它的外观以及客户使用的便捷性.
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.
推荐答案
我个人对Nivo Slider拥有丰富的经验,我记得他们使用了$(window).load
,我确实看到了您还在使用.
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.
更改此内容:
<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>
为此:
<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>
这篇关于在加载所有图像之前启动Nivo滑块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!