I have a bunch of divs which have jQuery sortable (as grid) enabled. This is all working fine, but I want to only have sortable enabled when a user drags the div - not when he clicks it. For example, these divs have scrollbars, and whenever you drag the handle, it binds the div to the mouse and forces you to sort it. How do I turn this off?
Here's my jQuery:
$( "#sortable" ).sortable({ items: 'li:not(.ui-tabs-nav-item,#newspod,#imglist li)', containment: '#sortable'})
$( "#sortable" ).disableSelection();
You can add this property
distance: 15
to your sortable object so that the user has to drag it 15 pixels before it will activate the sortable behavior.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With