简体   繁体   中英

bootstrap tagsinput source not working

I am trying to bind tagsinput with source option but it is not working. I am not understanding what I am missing there. Its a small code which I took from their official site http://www.jqueryscript.net/demo/Nice-Tags-Manager-Plugin-with-jQuery-Bootstrap-Bootstrap-Tags-Input/examples/ . Also there is no error on console. fiddle

$(document).ready(function () {
    $('#aa').tagsinput({
    source:['ams','bms','lite']
    })
});

This might not be the answer you are looking for but I feel that I must share my experience. I've tried A LOT of these third-party javascript tagging systems (including yours). Some didn't workedl; some did but some functionality was missing, etc. The solution that I've found to work best is selectize.js . It has most of the required functionality, here is some of it:

  • Add and remove items in any order without touching your mouse.
  • You can choose whether the user can create new tags or use only the ones you've provided for them
  • You can limit the count to your tags
  • It has a nice interface
  • It is fairly simple to use

I know this doesn't answer your question but I just feel obliged to tell you given the fact that I've wasted so much time searching for that kind of thing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM