$(document).ready(function(){ alert(); $('a.start').click(function(){ var node = $(this).parent(); var pic = node.find('img').attr('src'); $(this).hide(); load_img(node, pic); return false; }); function load_img(node, pic) { var imgload = new Image(); var imageUrl = pic + "&rnd="; $(imgload).attr('src', imageUrl + Math.random()).load( function () { node.find('img').remove(); node.append(this); setTimeout(function(){load_img(node, pic);}, 1000); } ); } });