Is it possible to choose and clear all options availiable in Tokenize2?

82 views Asked by At

I wanna add buttons "Choose all" and "Remove all" for the Tokenize2, to be able to past at once all possible options or to remove all at once . Is it possible? Please help.

1

There are 1 answers

0
Irinka On

I have managed to clear all :

$('button').on('click', function(){
    $('.tokenizeSelectClass').trigger('tokenize:clear');

});

I have managed to check all :

$('button').on('click', function(){
    $('.tokenizeSelectClass options').attr('selected', 'selected');
    $('.tokenizeSelectClass').trigger('tokenize:remap');

});