dragonofmercy / Tokenize2

Tokenize2 is a plugin which allows your users to select multiple items from a predefined list or ajax, using autocompletion as they type to find each item. You may have seen a similar type of text entry when filling in the recipients field sending messages on facebook or tags on tumblr.
https://dragonofmercy.github.io/Tokenize2/
BSD 3-Clause "New" or "Revised" License
83 stars 25 forks source link

Have way to add button for delete all tags with this plugin? #40

Closed zachross25 closed 7 years ago

zachross25 commented 7 years ago

d607ce789cd3c8b544da88ea3f8dbc69

dragonofmercy commented 7 years ago

This functionality will not be implemented. Just create a button and do like that

$('.button').on('click', function(e){
    e.preventDefault();
    $('.tokenize').tokenize().clear();
});

or

$('.button').on('click', function(e){
    e.preventDefault();
    $('.tokenize').tokenize2().trigger('tokenize:clear');
});