我目前有与此类似的东西,它在目标页面上加载一个包含图像的 div。
$('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");
});
});
我不知道如何在 div 中的图像加载完成后将 #info 更改为其他内容(这在加载返回 html 之后发生)。有没有办法做到这一点?
这正是您所需要的。我在工作中一直使用它来加载巨大的地图,而且它非常易于使用。
http://jqueryfordesigners.com/image-loading/ http://jqueryfordesigners.com/image-loading/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)