Fade in images after they have loaded

后端 未结 6 1215
半阙折子戏
半阙折子戏 2020-12-13 00:58

I found this code to achieve the desired effect and tried it on JSFiddle

http://jsfiddle.net/AndyMP/7F9tY/366/

It seems to work in that it fades the image in

6条回答
  •  温柔的废话
    2020-12-13 01:57

    html

    javascript

    .ready() does not fire they way you think it does, see the 'load' jQuery event handler

    $("#preload").load(function(evt){
          $(this).fadeIn(1000);
    });
    

提交回复
热议问题