javascript - Timeout doesn't work -
function updateimage(){ $("#fileimg").attr("src","secondimage.jpg"); $('#fileimg').fadein('slow'); } settimeout(updateimage(), 5000); this code tried. code reload image every 5 seconds. doesn't work. error in ie: invalid argument can y'all me? thanks.
2 options.
settimeout("updateimage()", 5000)
or
settimeout(function() { updateimage(); }, 5000);
Comments
Post a Comment