Niner
Niner

Reputation: 2205

jquery-chosen disable does not work

I'm referring this issue to an answered thread: disable jquery-chosen dropdown

This actually did not work for me when I tried it. And neither did that Fiddle link demo worked for me (Firefox v22). What am I mssing here? I basically just need to disable the jquery-chosen UI element when the real original select element is disabled. Is there another way of doing this?

Thanks.

Upvotes: 5

Views: 3790

Answers (1)

Orlando
Orlando

Reputation: 9692

that answer doesn't work with the last version.. they deprecated liszt:updated in favor of chosen:updated

something like this works

$(".chosen-select").prop('disabled', true).trigger("chosen:updated")

here's a JSFiddle

Update

  • Changing answer to use prop instead of attr

Upvotes: 7

Related Questions