[英]How can I add loading text/image to images that are still loading with jQuery?
我需要将此应用到由jQuery选择器选择的图像,例如$(“ img”),应将其应用到页面中的所有图像。
I guess you can do like this. 我想你可以这样。
create an initial layout with the following: 使用以下内容创建初始布局:
Image that you are loading with visibility:hidden; 您正在加载的具有可见性的图片:隐藏;
div with loading message. div与加载消息。
jQuery's domready show the image and hide the div. jQuery的domready显示图像并隐藏div。
Is this okay? 这个可以吗?
There is a tutorial at 有一个教程
http://jqueryfordesigners.com/image-loading/ http://jqueryfordesigners.com/image-loading/
that you would want to supplement with an each() loop in $("img") 您想在$(“ img”)中的each()循环中进行补充
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.