jQuery Chosen plugin without search field

前端 未结 12 872
时光说笑
时光说笑 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:19

    I used jQuery('select').chosen( {disable_search: true} ); but on chrome profiler, the method search_field_scale was called anyway and eat a lot of the performance.

    So I remove the method and all the calls to him and replaced with this.search_field.css({'width': '100%'}) on show_search_field_default and replace style=25px with style:100% and than this.search_field.css({ 'width': '23px' }); result_select because of the "data-placeholder"

    working fine for me.

提交回复
热议问题