jquery - Fallback image and timeout - External Content. Javascript -


What is the best way to set up a local fallback image if the external image does not load or too much time to load

You can add a carrier handler:

  Lt; Img src = "http://example.com/somejpg.jpg" onerror = 'this.onerror = null; Src = "./ oops.gif" '/ / gt;  

Establish terror to nullify the handler so that the browser does not die if oops.gif can not be loaded for any reason.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -