Closed LyleE closed 11 years ago
Thanks. For now this is probably sufficient, it will leave the plugin in an inconsistent state though.
In the future there will be a destroy
event emitted by skrollr which the plugins can react to and properly destroy themselves. Because with your fix the click handler is still bound and you end up with another one after each initialization.
Cool, yeah I figured you'd have a plan for something like that. Thanks!
Destroying Skrollr with this plugin initialised breaks any internal links in (at least) Chrome on OSX 10.8; any link scrolls to the top instead of the desired anchor.
This pull request: skrollr.addEvent is used instead of adding the event directly to window, which makes sure it gets removed when it should be.