Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad design leads to only one scrollorama instance being usable per page, and possible conflicts with other plugins #55

Closed
callumacrae opened this issue Jan 7, 2015 · 0 comments

Comments

@callumacrae
Copy link
Contributor

For some reason, you're storing the settings directly on the jQuery object. This is really bad design!

https://github.com/johnpolacek/scrollorama/blob/master/js/jquery.scrollorama.js#L11-L28

You can see that it's on the jQuery object by running $.settings in the console.

This is causing weird behaviour, and will also cause a fight with any other jQuery plugin or website that tries to use $.settings (which they don't, because it's a really bad idea).

I think that it was probably an accident: the destroy function tries to remove the entire jQuery object, which probably isn't the intention! Luckily, you're using delete wrong so it doesn't work.

PR incoming 😄

johnpolacek added a commit that referenced this issue Jan 7, 2015
Fixed #55: multiple scrolloramas are now possible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant