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

Take original background position into account. #6

Open
lhunath opened this issue May 28, 2013 · 2 comments
Open

Take original background position into account. #6

lhunath opened this issue May 28, 2013 · 2 comments

Comments

@lhunath
Copy link

lhunath commented May 28, 2013

When the background image's position isn't top-left, this plugin forces it to top-left + offset as soon as you start scrolling; which is never desired when a non-default position is set.

This plugin should figure out the position of the background before it sets it, and offset its own adjustments to the original position.

@lhunath
Copy link
Author

lhunath commented May 28, 2013

Looks like the problem is when the original position is not a pixel value but something like center or 50%:

parseInt(currentPosArray[1].replace(/[^0-9\-]/g, ""));

@lhunath
Copy link
Author

lhunath commented May 28, 2013

You might want to use jquery's relative css instead: http://jsfiddle.net/g7mSk/

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