Open arnoldbird opened 10 years ago
Looks like I can use http://api.jquery.com/height/ to calculate the height of my footer and then use bottomSpacing to prevent the sticky element from covering the footer.
Thanks, really helpful, however I don't understand how to use the height from said jquery calculation in the css. Is that possible?
I used the height in my js. I don't remember the thought process, exactly, but this is what I'm seeing in my js file...
var height = $('#section-footer').height(); $("#some-id").sticky({topSpacing:0, bottomSpacing: height + 20});
Thanks!
+1 for this. It would be awesome if there is a way to contain within a wrapper or perhaps we can specify which wrapper element to use. Maybe we there's additional option like
parent: "#myWrapper",
containInParent: true
Thanks, this fix works perfectly
How can I contain the sticky element within its parent so it doesn't cover my footer when I scroll down?