I want to float a layer as soon as I am scrolling to a certain point on a page. But my page is not static in height, but (very) dynamic. So this known solution will not work for me:
if($(window).scrollTop() > 1000) {
// do this
}
That's the reason I am wondering if there is a posibility to fire an event at the very moment a certain object (e.g. a div) has appeared on my screen?
Other solutions are also welcome of course.