在加载所有图像之前启动 Nivo-slider

发布于 2024-11-24 19:17:07 字数 259 浏览 3 评论 0原文

我正在使用 Nivo-slider Wordpress 插件,并且喜欢它的外观以及它对我的客户来说是多么容易使用。

唯一的问题是幻灯片在加载所有图像之前不会播放,一旦您有多个图像,这就是一个大问题:http://www.marcusmcshane.com/

有谁知道如何让幻灯片在第一对夫妇加载后开始播放?

预先感谢您可以提供的任何帮助。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦回梦里 2024-12-01 19:17:07

个人对 Nivo Slider 有丰富的经验,我记得他们使用 $(window).load 我确实看到您也在使用它。

更改此:

<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> 

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> 
烟雨凡馨 2024-12-01 19:17:07

这仍然与每个新的 Nivo Slider 全新安装和安装相关。卡罗琳的解决方案效果很好。

我保留了一份调整后的副本供设计使用,其中包含任何调整(如上面的内容),因此无需不断更改它。

保存:

    jQuery(function(){
$('#slider').nivoSlider();   });

..作为单独的文件(nivo.js)&从 html 文件调用它意味着如果需要的话可以很容易地调整或返回到原始状态。

为了让您更加安心,请定义 div (#slider) 的高度,这样页面就不会在加载缓慢的浏览器中弹出。

This is still relevant to each new Nivo Slider clean install & Caroline's solution works fine.

I keep an adjusted copy for design use with any tweaks (like the above) included, therefore no need to keep changing it.

Saving:

    jQuery(function(){
$('#slider').nivoSlider();   });

..as a separate file (nivo.js) & calling it from the html file means it's easily found to adjust or return to original if need be.

For added peace of mind define the height of a div (#slider) so the page doesn't pop around in slow loading browsers.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文