leafo / sticky-kit

A jQuery plugin for creating smart sticky elements
http://leafo.net/sticky-kit
2.91k stars 521 forks source link

Feature request: Only specific sub element to consider for inner_scrolling #208

Open enoversum opened 7 years ago

enoversum commented 7 years ago

So far, the inner_scrolling option works exactly as proposed, but is limited to considering the whole content of the stuck_in_parent element. However, in my sidebar, I have both a navigation ul that should be scrollable, and one element (an image) below that can be cut off at the bottom if not enough space is available, so the navigation ul sticks to the bottom, and not the image which takes away space needed for the ever-to-be-present navigation. Only sticking the navigation element doesn't help either, as the next element gets thrown to the top of the container, as position:fixed on the is_stuck element of course takes it out of space calculations for the sidebar. Is there already a way to achieve what I need :)?