Instead of following tutorials that make a div appear after scrolling down a set number of pixels, I am looking to achieve something different. I want a div to appear when the user scrolls past another div, and then disappear again when they scroll back up.
Why not base it on pixel count? I plan to use this for my menubar, which should appear at the top of the page once the user has scrolled past the banner image. However, if the browser window is resized (on mobile, tablet, or small screen), the height of the image will change. This means that using a fixed pixel count would not work, as the timing would be off depending on the size of the image.
I hope someone can provide guidance on how to achieve this unique requirement!