I’m trying to simulate what Yelp does with their Mo Map.
I know how to get an flip an element to fixed position once it reaches a certain screen scroll position, but how do you turn off fixed position once it hits the bottom of a relative container?
The css sticky position solves this, but since its fairly new, it doesnt have great coverage.
You can try doing something like this: little link.
Here’s a commented version of the JavaScript: (note: this uses jQuery, but it isn’t necessary. If you need a plain JavaScript version I’d be glad to provide some hints)