开发者

Jquery UI: draggable with constraints?

is it possible to set constraints for开发者_如何转开发 a draggable obeject? I have this line:

$("#info").draggable({ axis: 'y' });

i want this only to be draggable 200px towards the top. It should not be draggable towards the bottom? Is there any way to do that?


Did you check the demos? http://jqueryui.com/demos/draggable/#constrain-movement

You can use a few of the shown options to achieve what you are looking for (like making a container div that is 200 px higher, etc).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜