Making images fade in on image load using jquery

后端 未结 11 935
轻奢々
轻奢々 2020-12-06 07:04

I have a page full of images and I want each of them to fade in when loaded. I have the following code which works but seems buggy, basically sometimes not all the image fad

11条回答
  •  再見小時候
    2020-12-06 07:43

    I use the cool script of David DeSandro to check if images have loaded. (e.g. you can write a function which adds a class to the loaded images, so they will fade in using css transition. check it out:
    http://desandro.github.io/imagesloaded/

提交回复
热议问题