JQuery - Check when image is loaded?

后端 未结 4 1000
误落风尘
误落风尘 2020-12-16 04:10

I am having a bit of trouble working out when an image has been loaded.

I have been told that the following function will work but it isn\'t doing anything.

4条回答
  •  一生所求
    2020-12-16 04:33

    try this:

        $("#images img:last").one("load",function(){
          //do something    
    }
    

    or

        $("#images img:last").one("ready",function(){
          //do something    
    }
    

提交回复
热议问题