开发者

Dynamically moving div, like Yelp's moving map

I am tryi开发者_如何学Cng 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜