开发者

Reload doesn't reload

开发者 https://www.devze.com 2023-01-28 18:51 出处:网络
function updateimage(){ $(\"#fileimg\").attr(\"src\",\"image.jpg\"); $(\'#fileimg\').fadeIn(\'slow\');
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

精彩评论

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

关注公众号