I am using jquery sortable function for Li within a Ul tag, when i am dragging and dropping elements within ul, then i wanting that it can not be dragged left or right within ul. it should be dragged only up and down.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try this:
$( ".selector" ).sortable({ axis: 'y' });From the docs: