Friday 29 June 2012

JQuery- Auto Refresh Div Every X Seconds


<html>
<head>
<!-- For ease i'm just using a JQuery version hosted by JQuery- you can download any version and link to it locally -->
<script src="http://code.jquery.com/jquery-latest.js"></script>

<script>
var refreshId = setInterval(function()
{
     $('#responsecontainer').fadeOut("slow").load('response.php').fadeIn("slow");
}, 10000);
</script>
</head>
<body>

<div id="responsecontainer">
</div>
</body>

No comments:

Post a Comment