Search code examples
javascriptjqueryjquery-pluginspublic-methodtag-it

jQuery tagit plugin, public methods


Does anyone know if the tagit jQuery plugin has a public method for removing just 1 specified tag from the list?

I saw there is for removing (clear) all tags from the list, but I would need to remove only 1 tag :P

Also, how to call all the public methods from outside of tagit() call?


Solution

  • No, it does not. Just wrap a public function around _popTag in the widget code, e.g.

    removeTag : function(label,value) {
        this._popTag(label, value);
    }
    

    and call it like this:

    $(myElement).tagit("removeTag", label, value);