开发者

Drag website pages horizontally with Jquery

How can i achieve a dragable background like the bg of the site below using jquery?

http://us.blackberry.com/

I found something very close,a jquery plugin here. But it doesn't have option to drag. What will be the best way to 开发者_开发技巧do it?


There's a jQuery-plugin that helps you build these:

http://plugins.jquery.com/project/dragscroller

But in theory, if you want to do it yourself, you would have to listen for the mouseDown, then, while that is active, listen for the mouseMovement on the x-axis to scroll (with jQuery.scrollLeft() for example) and mouseUp to end the event-chain.


It's sort of swipe functionality. I would look into JQuery Mobile.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜