WeCodePixels / theia-sticky-sidebar

Glues your website's sidebars, making them permanently visible while scrolling.
MIT License
570 stars 209 forks source link

Limit scroll top because there are more elements in the sidebar #36

Open covaberjon opened 7 years ago

covaberjon commented 7 years ago

I have 3 different widgets in a sidebar. The only problem with your plugin is when scrolling top again, because the sticky element overlays the rest of the elements until it gets to the top. Is there any way to limit the sticky element at the top when it touches the widget that it has on the top of it? Nice plugin by the way!

BenMorel commented 7 years ago

Hi, you should provide a minimal example of this issue and host it somewhere like jsfiddle or codepen! You'll be much more likely to get help then.

covaberjon commented 7 years ago

Hi, This is the structure of the page where I am using theia sticky sidebar. I don't think a jsfiddle is needed because there is no problem with the theia sticky sidebar, however this plugin doesn't provide an option to configure the plugin so it has a top limit and not overlays the rest of the widgets when scrolling up. Any help would be appreciated.

liviucmg commented 7 years ago

Hi Diego,

The sidebar will stick alongside your container element. In this case your container is probably taller than your sidebar space, possibly it contains your site's header as well. So I would make sure that the container starts exactly where your sidebar starts on the Y axis (top to bottom). Hope this makes sense. Otherwise a jsfiddle would indeed help.

Cheers, Liviu