0
i am using the xoxco jquery.tagsinput plugin to insert a field with tags in my article, however I need a limit of tags inserted there, so I need a word counter to limit how many words are inserted, with the plug , whenever the user type "space" creates a tag
someone knows some script for it?
or other better plugin to create tags?
[edited]
function to count the tags typed with jquery.tagsinput.js plugin
var tagcount = 0;
$("#tags").tagsInput({
'width':'100%',
onAddTag: function(elem, elem_tags){
tagcount += $(this).length;
if(tagcount > 10){
$(this).removeTag(elem);
}
},
onRemoveTag: function(){
tagcount -= $(this).length;
}
});
thank you staff
With the callbacks
onAddTag
andonRemoveTag
you can’t do this?– relaxeaza
@Rafaelmafra vlw dude, I did a search and in the xoxco repository itself has a function for that, thank you man
– Jonnys J.