Return to Snippet

Revision: 34316
at October 21, 2010 01:21 by magicrebirth


Initial Code
// 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.

with($('#image')) {
 src = src.replace(/\?.*$/, '') + '?' + Math.random();
}

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

Initial Description

                                

Initial Title
Reload an image with jQuery

Initial Tags
js, image, jquery

Initial Language
JavaScript