Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function reloadImage(img) {
- var src = img.src;
- var iframe = document.createElement('iframe');
- iframe.onload = function() {
- iframe.onload = function() {
- // clean up properly
- document.head.removeChild(iframe);
- iframe.onload = function() {};
- iframe = null;
- // reload
- img.src = src;
- };
- iframe.contentWindow.location.reload(true);
- };
- iframe.src = src;
- document.head.appendChild(iframe);
- }
Add Comment
Please, Sign In to add comment