aehlke / tag-it

A jQuery UI plugin to handle multi-tag fields as well as tag suggestions/autocomplete.
http://aehlke.github.com/tag-it/
MIT License
2.48k stars 825 forks source link

Callback not working (Version 2.0) #421

Open JasminDreasond opened 5 years ago

JasminDreasond commented 5 years ago
$("#searchuser").tagit({
                    allowDuplicates: false,
                    tagLimit: 1,
                    availableTags: memberlist.users,
                    afterTagAdded: function (event, ui) {

                        // do something special
                        console.log(ui.tag);

                        console.log('Nyah 2');

                    }
                }).on("afterTagAdded", function (event, ui) {

                        // do something special
                        console.log(ui.tag);

                        console.log('Nyah');

                    });

I tried the classic example and the on. Nothing :c