Closed caneta closed 8 years ago
Hi, I've added a possibility to remove all the items through the following API:
//delete all items from jplist collection
$('#demo').jplist({
command: 'empty'
});
Please download the latest core file: https://raw.githubusercontent.com/no81no/jplist/master/dist/js/jplist.core.min.js
That's exactly what I were looking for, thanks!
You're welcome 👍
Trying to get the list empty, I came to the following solution:
Basically, I take my visible list items and delete them with the api. But this works only for visible items on the page, not on the hidden ones (hidden by the plugin, for example because filtered or paginated). Having no direct access to the hidden ones, I have to iterate this operation until the list is completely empty. I don't like very much this solution: is there a better way to get the list empty in one command? Thank you.