jQuery Chosen plugin without search field

前端 未结 12 868
时光说笑
时光说笑 2021-02-05 02:45

Not sure if this has been covered somewhere, but I couldn\'t find it in the documentation, and was wondering if it\'d be possible to not include the search input box with the jQ

12条回答
  •  情歌与酒
    2021-02-05 03:09

    Since none of the chosen-settings for hiding the search-field for multiple selects seemed to be working, I hacked the chosen.jquery.js in line 577 to:

  • ' + this.default_text + '
  • (Span instead of the input field). Needed to comment out this line, too

    this.search_field[0].disabled = false;
    

    Working fine for me - even though its not the best practice to hack the code.

提交回复
热议问题