我目前有类似于这样的内容,它在目标页面加载了一个包含图像的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中的图像加载完成后(即load返回html后),将#info更改为其他内容。是否有一种方法可以做到这一点?