jquery - tag-it - how to use preprocessTag method? -
i use tag-it make lables uppercase.
$('#taglabel').tagit({ availabletags: ['this','label1'] });
how join preprocesstag method available tags?
should use it
$('#taglabel').tagit({ "preprocesstag", function(val) { if (!val) { return ''; } return val[0].touppercase() + val.slice(1, val.length); });
the right syntax :
$("#tag-it".tagit({ availabletags: ["...","..."], ... });
and
// ensure tags capitalized $("#tag-it").tagit("preprocesstag", function(val) { if (!val) { return ''; } return val[0].touppercase() + val.slice(1, val.length); });
is way
update
you're syntax :
$('#taglabel').tagit( { <-- curly brace wrong "preprocesstag", function(val) { if (!val) { return ''; } return val[0].touppercase() + val.slice(1, val.length); });
Comments
Post a Comment