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).
精彩评论