jQuery Chosen - update select list without losing selections

前端 未结 4 955
梦如初夏
梦如初夏 2021-01-13 19:36

I\'m trying to use jQuery plugin \"Chosen\"

(http://harvesthq.github.com/chosen/ and https://github.com/harvesthq/chosen)

in my project.

What I\'m

4条回答
  •  南笙
    南笙 (楼主)
    2021-01-13 20:37

    The new code now updates the list without losing the selections, and it sorts the selections based on the options order.

    $('.chosen-select').trigger('chosen:updated');
    

    Reference their project page.

提交回复
热议问题