$('#bit_IsModule').click(function () {
if ($('#bit_IsModule:checked').val() == "true")
$("#featurename").slideUp();
else
$("#featurename").slideDown();
});
I want to disable the fir开发者_如何学JAVAst value in the select list on the checkbox click ? how can i do that
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();
}
});
精彩评论