gpt4 book ai didi

jquery - 使用 jQuery.load ('url.html' 确定图像插入后何时加载)

转载 作者:行者123 更新时间:2023-12-01 00:05:21 25 4
gpt4 key购买 nike

我目前有与此类似的东西,它会在目标页面上加载一个包含图像的 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 之后)。有办法做到这一点吗?

最佳答案

这正是您所需要的。我在工作中一直使用它来加载巨大的 map ,而且它非常易于使用。

http://jqueryfordesigners.com/image-loading/

关于jquery - 使用 jQuery.load ('url.html' 确定图像插入后何时加载),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1539129/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com