-
Notifications
You must be signed in to change notification settings - Fork 517
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
Use scrollTop of parent_selector instead of window? #257
Comments
Hi, Do you mind sharing your modified code? |
Yes I find myself needing this functionality too. $('.sticky').stick_in_parent({
offset_top: $('.sticky').parent().get(0).getBoundingClientRect().top,
});
$('.sticky').parent().scroll(function () {
$(document.body).trigger('sticky_kit:recalc');
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi
The current implementation seems to assume you care about scrolltop of the window, and I want it to be within the parent.
I changed the calcs to use the scrollTop of the (specified) parent and it seemed to work, but was wondering if there a way to do this without messing the code.
thanks!
The text was updated successfully, but these errors were encountered: