jQuery check if image is loaded

前端 未结 2 488
旧巷少年郎
旧巷少年郎 2021-01-21 08:01

I need help with the following code which doesn\'t work:

var timeoutID=0;
var currentImage=0;//first image is position 0 in arrImages array
var arrImages=[bla bla bla         


        
2条回答
  •  醉话见心
    2021-01-21 08:39

    'complete' is for native javascript object. so you should get javascript object from jQuery. like,

    $('#myImg')[0].complete
    

    or

    $('#myImg').get(0).complete
    

提交回复
热议问题