-
Notifications
You must be signed in to change notification settings - Fork 540
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
Avoid duplicated $.offset() call #50
Comments
Hi Gagarine, I saw that John already accepted your pull request. So the update is already in the code... regards, |
Nop it's not the same pull request :). |
As a reference point. On page http://johnpolacek.github.io/superscrollorama/ |
Hi Simon, sorry for the misunderstanding. Okay in general I think it's preferable to avoid unnecessary calls instead of replacing the offset function. I will then go over your changes and make sure there will be no unexpected behaviour for other users. thank you and regards, |
ok this was closed with the pull request #53 |
In the same idea than #48 we can avoid calling offset multiple time.
The Firefox's profiler show me this is where the script use most of the time. For my usage I even create my own offset function than is faster than the jQuery once. I can avoid some test than jQuery need like testing if we are in a iframe or not...
I will be happy to make a pull request but want to know what do you prefer:
You can see my version performing on http://face-it.ch/fr/mission/congo (it still a work in progress and script are uncompressed at least for the moment).
The text was updated successfully, but these errors were encountered: