本文介绍了搞清楚时加载的图像,他们使用的是jQuery.load插入后(“url.html”)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
目前,我有一些类似的,它加载目标网页,有图像,它在一个div。
I currently have something similar to this, it loads a div on the target page that has images in it.
$('a.galleryNext').click(function(){ // chnage the image to loading $("#info").html("LOADING"); $("#currentGal").load("gallery.php div#gallery"+currentgallery, function(){ //this fires much too early, the images are still loading... $("#info").html("DONE"); }); });
我无法弄清楚是如何#info变成东西在DIV完成加载(发生后负荷返回HTML)的影像后,其他人。有没有办法做到这一点?
What I cannot figure out is how to change #info into something else after the images in the div are done loading (which happens after the load returns the html). Is there a way to do this?
推荐答案这正是你需要的。我用它所有的时间在工作负载巨大的地图,它很容易使用。
This is exactly what you need. I use it all the time at work for loading huge maps and its really easy to use.
jqueryfordesigners/image-loading/
更多推荐
搞清楚时加载的图像,他们使用的是jQuery.load插入后(“url.html”)
发布评论