Closed szxraul closed 8 years ago
Have you tried this API? http://jplist.com/documentation/api#api-remove-items
Yes,the API I am using is the one you mentioned.But it could only remove one item with one run.
while($('.list-item').html()){ $('.know-chart-content').jplist({ command: 'del', commandData: { $item: $('.list-item') } }); }
the above is the code in my project to update the data-item.
Please use $items instead of $item:
$demo.jplist({
command: 'del'
,commandData: {
$items: $('.your-item-path') //select your items using jQuery
}
});
Thanks a lot. I'm very grateful for your project. Here is another question. The HTML is paginationed. So We can hardly select the whole items We had pushed in the storage. The click event binded on the page number would not be changed. I hope that there is a 'Update' method which automaticly clears the storage and push the new data-items.
Are you asking if local storage is updated after pagination button is clicked? If so, the answer is yes. The local storage is updated after each action of every control (sorting, pagination, filtering etc.). Of course local storage should be enabled in settings.
Everytime I update list-items, I need a 'While' to del the existing items, that's really awful. Or there is another method I dont know.