how to refresh Select2 dropdown menu after ajax loading different content?

后端 未结 7 681
夕颜
夕颜 2020-12-08 19:42

I\'m using Select2 in a combination of dropdown menus. I have one menu for \"Countries\" and one for \"States/Provinces\". Depending on the country that is chosen, the \"Sta

相关标签:
7条回答
  • 2020-12-08 20:19

    Use the following script after appending your select.

    $('#state').select2();
    

    Don't use destroy.

    0 讨论(0)
提交回复
热议问题