Your Ad Here

Posted By

jrobinsonc on 01/13/10


Tagged

jquery images


Versions (?)

Chequear si una imagen fue cargada


 / Published in: JavaScript
 

  1. var imgsrc = 'img/image1.png';
  2.  
  3. $('<img/>').load(function () {
  4. alert('La imagen se cargó');
  5. }).error(function () {
  6. alert('Error al cargar la imagen');
  7. }).attr('src', imgsrc);

Report this snippet  

You need to login to post a comment.