Permalink
Browse files

Interval bug

  • Loading branch information...
1 parent b5223aa commit fedcc69e228bd02b93df45f012bd36a499885c8e @dustball dustball committed Jan 26, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 static/main.js
View
@@ -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.