allow new values with chosen.js multiple select

后端 未结 10 1965
囚心锁ツ
囚心锁ツ 2020-12-12 19:30

I\'m using the chosen.js plugin http://harvesthq.github.com/chosen/ with jQuery to allow the user to select multiple options from a select. However, I now want to be able to

10条回答
  •  北海茫月
    2020-12-12 19:49

    According to the documentation you can try doing something like this:

    $('select').append('');
    $('select').trigger('liszt:updated');
    

    As Tony stated in the comments below:

    "Starting with version 1.0 which the trigger is now "chosen:updated". See harvesthq.github.io/chosen/#change-update-events"

提交回复
热议问题