Reputation: 4528
I can't get select2 to work with tags, despite copying the code that is provided exactly in the documentation. Here is a basic jsfiddle with select2 that is functional: http://jsfiddle.net/Gh4Ac/
Now the only thing I change in this new example is $("#e2").select2();
to $("#e2").select2({tags:["red", "green", "blue"]});
. Here is the result: http://jsfiddle.net/Gh4Ac/1/
Notice that the first example works, but the second doesn't. Can someone please explain how to get tags to work for select2?
Upvotes: 2
Views: 6402
Reputation: 4528
The solution is to use input
instead of select
. See http://jsfiddle.net/Gh4Ac/2/
Upvotes: 6