mdbootstrap / bootstrap-templates

A collection of free Bootstrap 5 templates.
https://mdbootstrap.com/freebies/
3.07k stars 1.02k forks source link

remove all method issue #663

Closed ghozalisara closed 2 years ago

ghozalisara commented 5 years ago

i have this tag input

I needed to remove all the tag in my input and i noticed when using the

$("#tagsinput").tagsinput('removeAll');

The input placeholder was removed too,

When inspecting i noticed that the old html element was just hideen by ading the "display:none;" property and a new element was created without the old placeholder.

So i guess i will implement my own remove all tags method which will delete the created span for each tag like this:

$( ".bootstrap-tagsinput span" ).remove();