tags:

views:

32

answers:

1

I am trying to implement something very similar to Yelp's moving map. See:

http://www.yelp.com/search?find_desc=restaurants&ns=1&find_loc=mountain+view%2C+ca

Basically it starts off somewhere in the middle of the page, but if you scroll down far enough that you wouldn't be able to see it, it moves down as well. What is the best way to do this in javascript? My app is in GWT, but I think I will have to use native js to achieve this effect.

Thanks, Jean

A: 

you need some sort of a scroll event handler. either register body.onscroll yourself or use a pre-existing component in any of a number of javascript frameworks. Google 'javascript scroll event' and you'll find plenty

seanizer