Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all elements #48

Open
stackthemes opened this issue May 30, 2019 · 1 comment
Open

Remove all elements #48

stackthemes opened this issue May 30, 2019 · 1 comment

Comments

@stackthemes
Copy link

I am trying to remove elements from the list on a button click. But when I click the button, the last item not deleted. I have to click button 2 times to remove all items.

Can any help? So all items can be removed in a single click. (What's wrong in my code).

https://codepen.io/nasir-mehmood/pen/YbJGog

@Lakhiii
Copy link

Lakhiii commented Jul 3, 2019

Hello Stack Themes,

Didn't find the issue but tried to change the code like this

$('#btn-cnt button').click( function() {
jplist.resetContent(function(){
$(".jplist-item-cnt").remove();
});
});

Tried this in your code pen and worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants