Permalink
Browse files

fix setInterval timer not being removed when scrollpane is destroyed

  • Loading branch information...
cmwelsh committed Feb 20, 2012
1 parent 3197c00 commit d574a7660e33617ea48988fcddf3298475e4d932
Showing with 5 additions and 0 deletions.
  1. +5 −0 script/jquery.jscrollpane.js
@@ -1138,6 +1138,11 @@
elem.replaceWith(originalElement.append(pane.children()));
originalElement.scrollTop(currentY);
originalElement.scrollLeft(currentX);
+
+ // clear reinitialize timer if active
+ if (reinitialiseInterval) {
+ clearInterval(reinitialiseInterval);
+ }
}
// Public API

0 comments on commit d574a76

Please sign in to comment.