开发者

Reload doesn't reload

function updateimage(){
 $("#fileimg").attr("src","image.jpg");
 $('#fileimg').fadeIn('slow');
}

function updatefiles(){
 $.get('files.php', function(data) {
   $('#files').html(data);
   $('#files').fadeIn('slow');
 });
}
updatefiles();

setTimeout('updateimage()', 5000);
s开发者_如何学PythonetTimeout('updatefiles()', 5000);

Well i have this code to update an image and some text, but it doesn't update... The data doesn't change and the fadein doesn't work.

can y'all help me? Thanks.


Instead of this:

setTimeout('updateimage()', 5000);
setTimeout('updatefiles()', 5000);

You should do this:

setTimeout(updateimage, 5000);
setTimeout(updatefiles, 5000);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜