Preload images for jQuery Cycle Plugin

穿精又带淫゛_ 提交于 2019-12-03 20:25:43

问题


I’m quite new to jquery and trying to figure out how to preload images for the jQuery Cycle Plugin.

I have 5+ large size images and I need those to be preloaded before starting the slideshow with Cycle plugin. Also I need to display a loading gif wile it preloads the images.

I have tried to implement the technique here http://jqueryfordesigners.com/image-loading/

but still couldn’t figure out how to make it work with the Cycle plugin.

Can anyone please help me with this?

Thanks


回答1:


...or if what you are experiencing is a pause between image transitions, add this argument to the cycle function. It makes cycle ignore non img content, such as whitespace and linebreaks, which can cause cycle to pause between transitions.

jQuery('.imageslideshow').cycle({
    slideExpr: 'img',
    // other options
});



回答2:


Manage to make it working..

http://www.thefancyhouse.com/charlienutting/

Thanks to David of course.

I got the idea from you.. but different approach :)

I'm learning Jquery fast.

Thanks everyone!



来源:https://stackoverflow.com/questions/427192/preload-images-for-jquery-cycle-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!