This piece of code is almost perfect, but it's missing a crucial element that I require. Essentially, when the input field has the attribute checked="checked"
, it should disable the other two elements. If the input is not checked, then the elements should remain enabled.
You can view my current code on jsFiddle here: http://jsfiddle.net/arunpjohny/gMgm7/1/
Below is an example of what my input looks like:
<input class="test_priv1" type="checkbox" name="custom" id="custom" checked="checked" onclick="" />
To sum it up, this scenario would translate to: If the input is checked, disable the other two elements. If the input has the attribute checked="checked", keep the other two elements disabled. When the input is unchecked, enable the two elements again.