I can disable one and one by doing this:
jQuery('#ListBoxA').attr('disabled','true');
But how can I apply this to multiple items? This does not work:
jQuery('#ListBoxA, #ListBoxB, #ListBoxC').attr('disabled','true');
UPDATE
Not much markup to show....
<select id="ListBoxA" size="4" name="countrySelectBox">
<select id="ListBoxB" size="4" name="cityListBox">
<select id="ListBoxC" size="4" name="storeListBox" multiple="multiple">
jQuery('#ListBoxA,#ListBoxB,#ListBoxC').attr('disabled','disabled');
(Without white spaces).
To enable use jQuery('#ListBoxA,#ListBoxB,#ListBoxC').removeAttr('disabled');
http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With