Hello everyone! I am just starting out in front end web development, so please bear with me if my question seems basic. I am trying to figure out how to create a sticky sidebar that only appears when the parent div is in view, and disappears when it's not. If you've seen how CSS Tricks implements sticky ads on the right side, that's the effect I'm going for. Check out the image below for reference: Image here
The catch is that I can't use position:sticky or position:fixed in css due to browser compatibility issues, particularly with Internet Explorer. Additionally, I don't want the sidebar to be fixed on the screen at all times, just until the end of its parent.
To clarify, I want the sidebar to only appear when the div enters the viewport, rather than being fixed throughout the entire page.
Here is the layout structure I am working with:
<div class="section">
<div class="sidebar left">
Sidebar
</div>
<div class="content">
Text here
</div>
</div>
Further content here...
Thank you in advance for your help! :)