How to use JQuery Sortable?

0

I have this code where I'm using sortable of JQuery. But I'm having problems because I'd like each item to be moved only by ico , but the current code lets you drag each item from anywhere in it. Can anyone help me?

    
asked by anonymous 20.07.2015 / 20:38

1 answer

1

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

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

Where .ico is the selector of your object.

    
20.07.2015 / 22:14