jQuery Chosen plugin without search field

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

    Use this code to disable it:

    jQuery('select').chosen( {disable_search: true} );
    

    and don't forget to hide it, otherwise it will still be working on mobile !

    .chzn-search{display: none}
    

提交回复
热议问题