I try to make the identifier active only when a certain type of switch is selected. The following is jQuery code:
$(document).ready(function() {
$('#Type').attr('disabled', 'disabled');
$('input[@name=action]').change(function() {
if ($("input[@name=action]:checked").val() == 'SomeKind')
$('#Type').removeAttr('disabled');
else
$('#Type').attr('disabled', 'disabled');
});
});
This works as intended, but with one drawback. When I click on the switch SomeKind, it does not make it Typeactive instantly; instead, I have to click again (anywhere on the page) for it to Typebe active.
I'm on IE7
source
share