Javascript Jquery UI可排序-子元素移动父项
我有以下html:Javascript Jquery UI可排序-子元素移动父项,javascript,jquery,jquery-ui,jquery-ui-sortable,Javascript,Jquery,Jquery Ui,Jquery Ui Sortable,我有以下html: <div class="wrapper"> <div class="box"> <div class="box__title"> <div class="box__move">move</div> </div> <div class="box__description"> </div>
<div class="wrapper">
<div class="box">
<div class="box__title">
<div class="box__move">move</div>
</div>
<div class="box__description">
</div>
</div>
<div class="box">
<div class="box__title">
<div class="box__move">move</div>
</div>
<div class="box__description">
</div>
</div>
</div>
是否有人能够提供帮助,或者这是不可能的?尝试:
$('.wrapper').sortable({
axis: 'y',
handle: '.box__move'
});
您希望“box\uu move”成为在“包装器”中移动“box”项的触发器。你是说你想让用户点击移动框?是的,没错。用户将单击“移动框”以拖动“框”
$('.wrapper').sortable({
axis: 'y',
handle: '.box__move'
});
$('.wrapper').sortable({
axis: 'y',
handle: '.box__move'
});