搞清楚时加载的图像,他们使用的是jQuery.load插入后(“url.html”)

编程入门 行业动态 更新时间:2024-10-24 10:21:00
本文介绍了搞清楚时加载的图像,他们使用的是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”)

本文发布于:2023-06-07 15:15:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/568479.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:的是   图像   加载   jQuery   url

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!