tag-it
tag-it copied to clipboard
UI-AutoComplete Mark-up
I know this is a question about the ui-widget instead of tag-it, but I was hoping you could provide brief documentation on how to add a span element (or any mark-up changes) to the
Ideally, I'd love to be able to pass an object to/from auto-complete to update the Tag-It tags (e.g., {typed: "yesterday", display: "Shared: Yesterday", icon: "date.png"}).
Lastly, is there a way to focus the input on document ready? (e.g., $("#search input").focus();)
//DeanM most override tagit render of the associate field to include the image in autocomplete
monkeyPatchAutocomplete();
function monkeyPatchAutocomplete() { $.ui.autocomplete.prototype._renderItem = function (ul, item) { var regexp = new RegExp(this.term, 'gi'); //var regexp = new RegExp('(>[^<.])(' + this.term + ')([^<.])','gi'); var highlightedVal = item.label.replace(regexp, "" + this.term + ""); return $("
" + highlightedVal + " " + item.extra + " |