Reputation: 44293
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?
Upvotes: 1
Views: 4425
Reputation: 704
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).
Upvotes: 2