Constrained sticky sidebar with offset using jQuery

This constrained sidebar scrolls within a parent track. When the sidebar is fixed it has a margin from the top of the page to prevent it sitting against the edge of the window. Warning, this is not mobile tested although I did write a method to remove the fixed behaviour of the sticky when the window.height is less than the total of the sticky.height + sticky.margin.

Leave a Reply