I have a select div, which I use the selected jquery plugin to style and add features (primarily for searching). Div looks something like this:
<select data-placeholder="add a foobar" id="foobar" style="width: 350px;"> <option value=""></option> </select>
And I use the selected plugin like this,
$('#foobar').chosen();
While some AJAX are loading, I would like to disable the entire div <select> . Maybe something like this,
$('#foobar').disable()
or
$('#foobar').prop('disabled', true)
I think you get the point.
Any ideas on how to do this? I tried several different things, for example, using jquery idioms to disable things by disabling <select> , which simply disables the base selection and not the selected material on top of it. I even resorted to manually adding another div with a high z-index to just dullness in the field, but I think it will probably be ugly and buggy.
Thanks for the help!
javascript jquery jquery-chosen
gideonite Jun 17 '13 at 17:33 2013-06-17 17:33
source share