Disable select2 plugin in JQuery dropdown
问题 I am getting the values from json and displaying it in a popup. I need to disable that option which i am getting from json. How can i do that? I tried normal jQuery but It doesn't work. I tried disabled true that also not working. Please give solution. 回答1: From the select2 docs In case that you need to disable certain options so that they can't be selected by the select2 interface, you can now pass in disabled: true with your data. Please note: This also works for incoming values from ajax.