Skip to content
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #486 from ethanresnick/refresh-bugfi
Browse files Browse the repository at this point in the history
When calling refresh, make sure to clean DOM elements which are no longer skrollables.
  • Loading branch information
Prinzhorn committed Apr 18, 2014
2 parents a08d115 + e7cce78 commit 42e6b8a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/skrollr.js
Expand Up @@ -350,6 +350,11 @@
//The edge strategy for this particular element.
var edgeStrategy = _edgeStrategy;

// If we're reseting the counter, remove any old element ids that may be hanging around.
if(ignoreID) {
delete el[SKROLLABLE_ID_DOM_PROPERTY];
}

if(!el.attributes) {
continue;
}
Expand Down Expand Up @@ -1690,4 +1695,4 @@
window.skrollr = skrollr;
}

}(window, document));
}(window, document));

0 comments on commit 42e6b8a

Please sign in to comment.