Created
April 23, 2011 23:14
-
-
Save adenine/939077 to your computer and use it in GitHub Desktop.
Basic Ajax Page Refresh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | |
"http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>untitled</title> | |
<meta name="author" content="Joshua Walton LAB"> | |
<!-- Date: 2011-04-20 --> | |
</head> | |
<style type="text/css" media="screen"> | |
body { | |
padding: 0; | |
margin: 0; | |
background: #FFF; | |
color: #333333; | |
} | |
#content { | |
padding: 0; | |
margin: 0; | |
padding: 0px; | |
</style> | |
<body> | |
<div id="content"> | |
</div> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script> | |
$(document).ready(function() { | |
$("#content").load("readrss.php"); | |
var refreshId = setInterval(function() { | |
$("#content").load('readrss.php?randval='+ Math.random()); | |
}, 9000); | |
$.ajaxSetup({ cache: false }); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment