Check if an image is loaded (no errors) with jQuery

前端 未结 15 1323
挽巷
挽巷 2020-11-21 20:45

I\'m using JavaScript with the jQuery library to manipulate image thumbnails contained in a unordered list. When the image is loaded it does one thing, when an error occurs

15条回答
  •  灰色年华
    2020-11-21 21:11

    Realtime network detector - check network status without refreshing the page: (it's not jquery, but tested, and 100% works:(tested on Firefox v25.0))

    Code:

    
    
    
    

    if connection lost just press the Again button.

    Update 1: Auto detect without refreshing the page:

    
    
    

提交回复
热议问题