Navigate window by clicking and dragging
I´ve created 开发者_开发知识库a map using CSS, and you can zoom by clicking somewhere on the map (using jQuery). The CSS div that contains the map has overflow: auto. When I zoom everything get´s bigger of course and scrollbars appear. I rather want to have it as Google Maps, where you click and drag to navigate. Any ideas how I can do that?
Thanks for your help!
Scrollbars appear because the content is too big for its parent. The scrollbars are the way to navigate the content inside the smaller parent.
Google maps remove the scrollbars, but they replace them with the "control pad" the drag functionality.
Maybe this plugin, Dragscrollable (demo), is what you are looking for?
精彩评论