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);
精彩评论