开发者

How to load fancybox images into browser cache after document ready?

I have a list of ten anchored thumbnails and some facts, and when you click a thumbnail a full page chart pops up in a Fancybox window. There is a delay the first time you click any specific thumbnail as it loads the image into the cache.

How can I pre-load all of the images from the links into the browser cache so that they pop up instantly into a Fancybox the first time the开发者_如何学运维y are clicked?


You can do that by creating a div not visible and containing all images that Fancybox require. And you create this div when doc is ready for sure.

<div style="display:none;">
    <img src="..." />
</div>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜