How can I add loading text/image to images that are still loading with jQuery?

后端 未结 3 1138
南旧
南旧 2021-01-15 19:56

I need to apply this to images that are selected by jQuery selector for example $(\"img\"), should apply this to all images in page.

相关标签:
3条回答
  • 2021-01-15 20:33

    There is a tutorial at

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

    that you would want to supplement with an each() loop in $("img")

    0 讨论(0)
  • 2021-01-15 20:35

    I guess you can do like this.

    create an initial layout with the following:

    1. Image that you are loading with visibility:hidden;

    2. div with loading message.

    3. jQuery's domready show the image and hide the div.

    Is this okay?

    0 讨论(0)
  • 2021-01-15 20:36

    jquery loading image while elements loads https://stackoverflow.com/.../adding-a-loading-image-to-dynamic-images-comming-from-flickr

    0 讨论(0)
提交回复
热议问题