mirror of
https://github.com/wahyd4/jQuery-Tags-Input.git
synced 2026-08-09 04:46:44 +10:00
Fix bug in tagExist
This commit is contained in:
+4
-1
@@ -186,7 +186,10 @@
|
||||
};
|
||||
|
||||
$.fn.tagExist = function(val) {
|
||||
return (jQuery.inArray(val, $(this)) >= 0); //true when tag exists, false when not
|
||||
|
||||
var settings = $(this).data('settings');
|
||||
var tagslist = $(this).val().split(settings.delimiter);
|
||||
return (jQuery.inArray(val, tagslist) >= 0); //true when tag exists, false when not
|
||||
};
|
||||
|
||||
// clear all existing tags and import new ones from a string
|
||||
|
||||
Reference in New Issue
Block a user