I have a drop-down with some entries and a checkbox.
If I've selected the 2nd entry in my drop-down, the checkbox should be enabled. Otherwise, it should be disabled and unchecked. I don't know how to deal with this.
This is what I got:
function checkSelected() {
if (("#test").prop('selectedIndex') === 2) {
//disable and uncheck
} else {
//enable
}
}
HTML:
<select id="test">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
<input id="test2" type="checkbox" name="test2">