我想在我拖动图标(class="icon"
)时才开始排序。
JS
$('#sortable_test2').sortable({ cancel: '.noDrag' }); // did not work
HTML
<div id="sortable_test2" style="margin:20px; background-color:#cacaca;" class="noDrag">
<div id="ct1" class="ct"><div class="icon">icon</div>sortable 1</div>
<div id="ct2" class="ct"><div class="icon">icon</div>sortable 2</div>
<div id="ct3" class="ct"><div class="icon">icon</div>sortable 3</div>
</div>
示例
http://jsbin.com/igohod/15/edit#source
提前致谢!