Tagit don't work if there is "a" tag inside li #102

jcubic opened this Issue Sep 14, 2012 · 0 comments


None yet

1 participant

jcubic commented Sep 14, 2012

If child of the li is not simple text but node like link, it should add that link.

in order to fix this I need to use code like this

           var tag_list = $('.tags ul');
            var tags = tag_list.find('li').detach();
            var finish = false;
            tag_list = tag_list.tagit({
                allowSpaces: true,
                triggerKeys: ['enter', 'comma', 'tab'],
                onTagClicked: $.noop,
                onTagAdded: function(event, tag) {
                    if (finish) {
                onTagRemoved: function(event, tag) {
            tags.each(function() {
                var a = $(this).find('a');
                tag_list.tagit("createTag", a.text()).
                    .attr('href', a.attr('href'));
            finish = true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment