Reputation: 393
I try to use jquery-ui-sortable to sort some buttons. See: https://jsfiddle.net/k4kpfrcm/2/
<div id="sort">
<button>test1</button>
<button>test1</button>
<button>test1</button>
</div>
$("#sort").sortable();
But it is not working. What's wrong with this?
How can I get this working?
Upvotes: 2
Views: 508
Reputation: 3678
use option cancel
$("#sort").sortable({cancel: ''});
because the cancel option is set to input,textarea,button,select,option
so the button will not handle the sortable.
working demo: https://jsfiddle.net/k4kpfrcm/3/
Upvotes: 3