How to use Jquery Sortable?

Asked

Viewed 162 times

0

have that code where I’m using the sortable jquery. But I’m having problems, because I would like each item to be moved only by ico, but the current code allows you to drag each item from anywhere in it. Can someone help me?

1 answer

1


You need to reference the object responsible for the sortable call, use the attribute handle of the plugin.

$("#conteudo").sortable({handle: ".ico"});

Where .ico is the selector of your object.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.