mbraak / jqTree

Tree widget for jQuery
https://mbraak.github.io/jqTree/
Apache License 2.0
1.02k stars 177 forks source link

[upgrade] Create handle option #7

Closed trojkat closed 12 years ago

trojkat commented 12 years ago

When you got links inside ul list sometimes when you click them you move whole li element. Is there a way to specify handle element?

Example:

          <li><span class="handle">move me</span> <a href="http://google.com/">Google</a></li>
          <li><span class="handle">move me</span> <a href="http://jquery.com/">jQuery</a></li>
    </ul>```

```javascript
$('#tree1').tree({
    data: data,
    handle: '.handle'
});

Demo - http://demo.wil-linssen.com/jquery-sortable-ajax/

mbraak commented 12 years ago

Yes, you can use the 'onIsMoveHandle' option. See http://mbraak.github.com/jqTree/#tree-options-onismovehandle

trojkat commented 12 years ago

Omg, sorry, I'm blind :-/