Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Add method for returning list of tags #301

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/jquery.tagsinput.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,11 @@
var tagslist = $(this).val().split(delimiter[id]);
return (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not
};

$.fn.getTags = function() {
var id = $(this).attr('id');
return $(this).val().split(delimiter[id]);
};

// clear all existing tags and import new ones from a string
$.fn.importTags = function(str) {
Expand Down