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.
精彩评论