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?
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?
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.