Skip to content

Commit

Permalink
added clearTimeout when loading stopped
Browse files Browse the repository at this point in the history
  • Loading branch information
thomd committed Jul 27, 2009
1 parent 478cdfa commit 20f8ca9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion javascripts/loading_notice.js
Expand Up @@ -18,7 +18,7 @@ var LoadingNotice = Class.create({

startLoading: function() {
this.loaded = false;
window.setTimeout(this.showLoading.bind(this), 200);
this.timeout = window.setTimeout(this.showLoading.bind(this), 200);
},

showLoading: function() {
Expand All @@ -42,6 +42,7 @@ var LoadingNotice = Class.create({
},

stopLoading: function() {
window.clearTimeout(this.timeout);
this.loading.hide();
this.loaded = true;

Expand Down

0 comments on commit 20f8ca9

Please sign in to comment.