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

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -