Skip to content

Commit

Permalink
Interval bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dustball committed Jan 26, 2011
1 parent b5223aa commit fedcc69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion static/main.js
Expand Up @@ -14,12 +14,15 @@ function refreshPage() {
$.ajax({
url: '/',
success: function(data) {
if (window.oldint) {
clearTimeout(window.oldint);
}
$('#body').html(data);
}
});
}

$(document).ready(function(){
setInterval(refreshPage,3 * 60 * 1000);
window.oldint = setInterval(refreshPage,3 * 60 * 1000);
letsDance();
});

0 comments on commit fedcc69

Please sign in to comment.