开发者

jquery sortable on a specific area

How开发者_如何学JAVA do I set the $().sortable(); to a specific area to drag the entire object on? For instance, i want the user to only drag the object by holding on the area of the object.

this is my JS:

$('ul.droptrue').sortable({
            connectWith: 'ul'
});

here's my html

<ul class="droptrue">
   <li>
       <span>Title</span>
       <div>Body</div>
   </li>
</ul>


Like this:

$('ul.droptrue').sortable({
    connectWith: 'ul',
    handle: 'span'
});

You should read the documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜