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:

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?
Comment by Ben Marshall — February 11, 2009 @ 4:07 pm
setTimeout(‘ajax_update()’, 6000);
just change the 6000 to 3000.
Comment by admin — February 14, 2009 @ 4:58 am
This code not working oo mozila broeser, is there any way to work on mozila also. pls help me
Comment by Suresh — April 15, 2009 @ 6:22 am