A repository of over 1000 quality jQuery plugins

jQuery Tagmate

Tagmate is a jQuery Autocomplete plugin.

Created by Bitdrift

jQuery plugin for Facebook/Twitter style textarea @user autocomplete + #hashtag parser

Not what you're looking for? Click here to view more Autocomplete jQuery plugins

TAGMATE!

A jQuery plugin for capturing tags within textareas (Facebook / Twitter style).

AUTHORS

FEATURES

  • Supports #hash tags, @name tags, and $price tags out of the box.
  • Inline autocomplete similar to jQuery UI autocomplete plugin.
  • reate custom tag parsing rules.
  • EXPERIMENTAL inline tag higlighting mode.

REQUIRES

EXAMPLE

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script type="text/javascript" src="./jquery.fieldselection.js"></script>
<script type="text/javascript" src="./jquery.scrollTo.js"></script>
<script type="text/javascript" src="./jquery.tagmate.js"></script>
<script type="text/javascript">
    $(function() {
        $("#myTextarea").tagmate();
        $("#myForm").submit(function() {
            var tags = $("#myTextarea").getTags();
            alert(tags);
            return false;
        });
    });
</script>
<form id="myForm">
    <textarea id="myTextarea"></textarea>
    <input type="submit"/>
</form>

OPTIONS

  • exprs - Mapping of tag keys to regular expression rules.
    • Example: { '#': '\\w+' }
    • Default: Tagmate.DEFAULT_EXPRS
  • sources - Mapping of tag keys to autocomplete suggestions. Value can be an array or a function.
    • Example: { '@': [{label:'Mr. Foo',value:'foo'}] }
  • capture_tag - Callback fired when tags are captured.
    • Example: function(tag) { alert('Got tag: ' + tag); }
  • replace_tag - Callback fired when tag is replaced.
    • Example: function(tag, label) { alert('replaced:' + tag + ' with: ' + label); }
  • menu_class - CSS class to add to the menu.
    • Default: "tagmate-menu".
  • menu_option_class - CSS class to add to menu options.
    • Default: "tagmate-menu-option"
  • menu_option_active_class - CSS class to use when menu option is active.
    • Default: "tagmate-menu-option-active"
  • highlight_tags - EXPERIMENTAL! Enable at your own risk! Highlights tags by placing a div behind the transparent textarea.
    • Default: false
  • highlight_class - CSS class to use for highlighted tags.
    • Default: "tagmate-highlight"


You might also like these other Autocomplete jQuery Plugins

  • Asdfasdf.js

    Auto save data form- The easiest way to not let your user lose their data while filling a form.

  • jQuery Typeahead

    jQuery Typeahead plugin (autocomplete) for search input

  • JQueryTimeAutocomplete

    jQuery autocomplete plugin that works with times. Works basically the same as Google Calendars time input when you add an event. Example:...

License:

Permission is hereby granted, free of charge, to any person obtaining