Hide images until they're loaded

前端 未结 2 1102
终归单人心
终归单人心 2020-12-18 16:01

I got a jQuery script which is dinamically appending data to the \"holder\" at some timeinterval. The data looks like this:

2条回答
  •  遥遥无期
    2020-12-18 16:25

    You can add your images in first-loaded-first displayed order like this:

    Demo: http://jsfiddle.net/m1erickson/7w6cb/

    var imageURLs=[];
    var imgs=[];
    imageURLs.push("house100x100.png");
    imageURLs.push("house32x32.png");
    imageURLs.push("house16x16.png");
    
    for(var i=0;i

提交回复
热议问题