Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pjona authored Oct 22, 2017
1 parent 847d649 commit cc56b7f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,24 +199,19 @@ $('.dd').nestable('replace', {"id":1,"children":[{"id":4}]});
```

`remove`:
You can remove existing item by passing 'id' of this element.
You also can add 'fade' parameter to fadeOut element before removing.
This will delete the item with all his children.
You can remove existing item by passing 'id' of this element. To animate item removing check `effect` config option. This will delete the item with all his children.
```js
$('.dd').nestable('remove', 1);
```
This will invoke callback function after deleting the item with data-id '1'.
It is usefull if you use effect option to animate item removing, but if you don't need it just omit second argument.
```js
$('.dd').nestable('remove', 1, function(){
console.log('Item deleted');
});
```

`removeAll`:
Removes all items from the list.
You can also use callback function to do something after removing all items.
It is usefull if you use effect option to animate items removing, but if you don't need it just omit second argument.
Removes all items from the list. To animate items removing check `effect` config option. You can also use callback function to do something after removing all items.
```js
$('.dd').nestable('removeAll', function(){
console.log('All items deleted');
Expand Down

0 comments on commit cc56b7f

Please sign in to comment.