Search code examples
javascriptjqueryjquery-tokeninput

How To add a placeholder to jQuery Tokeninput?


How can I add a placeholder to a jQuery Tokeninput field? A normal placeholder attribute won't work in here.


Solution

  • I think the current version of tokenInput supports this:

    $(function() {
      $("#elementID").tokenInput("http://www.foo.com/bar", {
      placeholder: 'Place holder text...'
    });