Skip to content Skip to sidebar Skip to footer

Jquery Enable Select Only If Certain Options Are Selected

i have this form that starts with 1 select DISABLED and 4 options i need a jquery that does this: if OPTION #1 (on click) check if other options are selected and RESET (erase value

Solution 1:

Updated fiddle: http://jsfiddle.net/zZSJb/3/


Something like this: http://jsfiddle.net/zZSJb/

$('#op1, #op3').click(function() {
    $('input[type="checkbox"]').removeAttr('checked');
    $(this).attr('checked', true);
});

$('#op2').click(function() {
    $('#menus').removeAttr('disabled');
    $('input[type="checkbox"]').removeAttr('checked');    
    $(this).attr('checked', true);
});

$('#txt').keyup(function() {
    $('#menus').removeAttr('disabled');
    $('input[type="checkbox"]').removeAttr('checked').attr('disabled', true);
});

You may need to fine tune it to your exact needs (which I couldn't completely figure out!).


Post a Comment for "Jquery Enable Select Only If Certain Options Are Selected"