With the jQuery UI's sortable function, a user can move the div in any direction. I only want the user to be able to drag it up and down. How would I go about doing this?
Thanks in advance.
Specific to sortable:
http://api.jqueryui.com/sortable/#option-axis
$( ".selector" ).sortable({ axis: "y" });
Try something like this:
$('#items_wrapper').sortable({
axis: 'y',
containment: 'parent',
...
...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With