A MooTools plugin that enables easy entry and editing for "tags", including AJAX (cough) look-ups or pre-defined arrays of "answers". Warning: I don't develop or support it anymore.
How to use
Mootagify Method Constructor
new mooTagify(element[, request, options]);
- element - (mixed) A string of the id for an Element or an Element that contains the group of items as in the suggested markup below.
- request - (Request object, optional) A pre-configured Request class that does the automatic lookups. Suggester uses it to show options onComplete
- options - (object, optional) a key/value object of options
- ready - (function) The function to apply when the instance is ready
- limitReached - (function) The function to apply when the maximum tags allowed limit is reached. Fires multiple times for every rejected tag, which is passed as the argument.
- invalidTag - (function) The function to apply when a tag is being rejected due to length. Fires multiple times for every rejected tag, which is passed as the argument.
- tagsUpdate - (function) The function to apply after tag processing has been completed and new tags have been added. Passes an array of all accepted new tags
- tagRemove - (function) The function to apply when a tag is being removed. Passes the removed tag's text as argument
<div id="tagWrap" class="hide"> <div class="left tagLock"> <!-- tags will go here --> </div> <div class="left"> <input value="preload,tags,here" id="listTags" name="listTags" placeholder="+Add tags" /> </div> <div class="clear"></div> </div>
Mootagify Method Gettags
Returns an array of the current tags
var array = myMooTagify.getTags();
- (array) An array of tags in memory
Example With Autocomplete
This needs PHP to run the results mocker: http://fragged.org/mooTagify/Demo/
Testing Via Buster Js And Syn
Check the contents of the test directory and the README.md provided.
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.blog comments powered by Disqus