jQuery is cool , Really !
Ajax.js
[source language='js']
var _v = 0;
var _v2 = 1;
function ajax_update()
{
var wrapperId = ‘#content’;
var postFile = ‘jquery.php’;
_v++;
_v2++;
$.post(postFile, { v2: _v2 , v: _v}, function(data){$(wrapperId).slideUp(’2000′,function(){$(this).html(data).slideDown();}).html();});
setTimeout(‘ajax_update()’, 6000);
}
[/source]
check the demo here.
Download the script here.
Related posts:
Tags: ajax, auto refresh, jQuery, php
Is there a way to make it go away after a certain number of seconds (like 3) and then after the 6 seconds it starts again?
setTimeout(‘ajax_update()’, 6000);
just change the 6000 to 3000.
This code not working oo mozila broeser, is there any way to work on mozila also. pls help me
I really enjoy visiting your blog! your excellent system to see things is what keeps me interested. Thanks so much!!!!
gazduire web…
[...]PHP + Jquery + Ajax auto refresh DIV « Day Recipe[...]…
Undeniably believe that that you said. Your favorite justification seemed to be on the internet the easiest thing to have in mind of. I say to you, I definitely get annoyed while other people think about concerns that they plainly don’t realize about. You managed to hit the nail upon the top and outlined out the whole thing without having side-effects , other people could take a signal. Will likely be again to get more. Thanks
click here…
[...]PHP + Jquery + Ajax auto refresh DIV « Day Recipe[...]…
strompreise…
[...]PHP + Jquery + Ajax auto refresh DIV « Day Recipe[...]…
BePolished zorgt er voor dat uw voertuig, zowel van binnen als van buiten, weer als nieuw wordt tegen uiterst scherpe prijzen! Wij werken met de meest exclusieve spullen van o.a. Meguiar’s, Gliptone, Monello en meer….
[...]PHP + Jquery + Ajax auto refresh DIV « Day Recipe[...]…
I do not even understand how I stopped up right here, but I believed this publish was once great. I do not know who you might be but definitely you’re going to a well-known blogger in case you are not already
Cheers!
playstation 3 streaming…
[...]PHP + Jquery + Ajax auto refresh DIV « Day Recipe[...]…