Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #46 from boberkfell/master

adding placeholder text
  • Loading branch information...
commit f974e4e3d17da7b22abeb5f1778ea7e8b915c2be 2 parents 396745e + a877af5
@aehlke aehlke authored
Showing with 9 additions and 0 deletions.
  1. +5 −0 README.markdown
  2. +4 −0 js/tag-it.js
View
5 README.markdown
@@ -147,6 +147,11 @@ Optionally set a *tabindex* attribute on the `input` that gets created for tag-i
Defaults to *null*
+### placeholderText (String)
+Optionally set a *placeholder* attribute on the `input` that gets created for tag-it user input.
+
+Defaults to *null*
+
## Events
View
4 js/tag-it.js
@@ -34,6 +34,7 @@
tagSource : null,
removeConfirmation: false,
caseSensitive : true,
+ placeholderText : null,
// When enabled, quotes are not neccesary
// for inputting multi-word tags.
@@ -100,6 +101,9 @@
if (this.options.tabIndex) {
this._tagInput.attr('tabindex', this.options.tabIndex);
}
+ if (this.options.placeholderText) {
+ this._tagInput.attr('placeholder', this.options.placeholderText);
+ }
this.options.tagSource = this.options.tagSource || function(search, showChoices) {
var filter = search.term.toLowerCase();
Please sign in to comment.
Something went wrong with that request. Please try again.