How can I add a placeholder to a jQuery Tokeninput field? A normal placeholder
attribute won't work in here.
For a input like:
<input type="text" id="myInput" />
You can do:
$("#myInput").tokenInput("/scripts/myjson.js");
$("#token-input-myInput").attr("placeholder", "Type here");
When you use tokenInput, it changes your input's id to "token-input-XXX", where XXX is the previous id
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With