You can use tagLimit
options and set it to 5
$("#myTags").tagit({
tagLimit: 5
});
You can view more options from their docs here
質問
How will I be able to limit the number of inputs a user can input from a Tag-It feature in jquery? I am currently using this plugin, but I would only want the user to be able to input 3 types of tag in an input box similar to our tags here at stack that limits the user to a maximum of 5 tags per question.
解決
You can use tagLimit
options and set it to 5
$("#myTags").tagit({
tagLimit: 5
});
You can view more options from their docs here