Currently, I have a collapsible side navigation whose height is unknown, with a div underneath it. The goal is for the div to change its position to 'fixed' when scrolled to its bottom.
I have successfully achieved this functionality; however, I am facing an issue where when I scroll back to the top, the div remains fixed. I am struggling to find a solution to make it return to a 'static' position at its original point, as I do not know the exact location.
If you would like to see my approach, you can check out this fiddle: https://jsfiddle.net/1krLnv7q/2/.
Any assistance or guidance would be greatly appreciated as I am currently stuck.