tags:

views:

30

answers:

1
  $('#bit_IsModule').click(function () {
        if ($('#bit_IsModule:checked').val() == "true")

            $("#featurename").slideUp();
        else
            $("#featurename").slideDown();
    });

I want to disable the first value in the select list on the checkbox click ? how can i do that

A: 

This should do the trick, #select_id is the name of your select.

$('#bit_IsModule').click(function () {
    if( $(this).attr('checked') ) {
        $('#select_id option:first').attr( 'disabled', true );
        $("#featurename").slideUp();
    } else {
        $('#select_id option:first').attr( 'disabled', false );
        $("#featurename").slideDown();
    }
});
Kerry
it is not working
mazhar kaunain baig
When you don't post your HTML it is very difficult to work in. Create a JS Fiddle
Kerry