From 8a67752cb47c93366af43ab91baba1fe309b0513 Mon Sep 17 00:00:00 2001 From: Ben Brown Date: Thu, 28 Apr 2011 14:58:58 -0500 Subject: [PATCH] Added info for new callback function parameters --- README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README b/README index e104975..d9ff525 100644 --- a/README +++ b/README @@ -50,6 +50,10 @@ You can add and remove tags by calling the addTag() and removeTag() functions. $('#tags').addTag('foo'); $('#tags').removeTag('bar'); +If additional functionality is required when a tag is added or removed, you may specify +callback functions via the onAddTag and onRemoveTag parameters. Both functions should +accept a single tag as the parameter. + Options $(selector).tagsInput({ @@ -58,6 +62,8 @@ $(selector).tagsInput({ 'height':'100px', 'width':'300px', 'defaultText':'add a tag', + 'onAddTag':callback_function, + 'onRemoveTag':callback_function, 'minChars' : 0, 'maxChars' : 0 //if not provided there is no limit });