Posted By

magicrebirth on 10/21/10


Tagged

js image jquery relaod


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

wirenaught


Reload an image with jQuery


 / Published in: JavaScript
 

URL: http://johannburkard.de/blog/programming/javascript/6-fast-jQuery-Tips-More-basic-Snippets.html

  1. // There is no reload or replace method for images. The src property can be set in the same way as the location.href property though.
  2.  
  3. with($('#image')) {
  4. src = src.replace(/\?.*$/, '') + '?' + Math.random();
  5. }

Report this snippet  

You need to login to post a comment.