I have three checkbox (All, Selected, Un-Selected). If i select 'ALL' checkbox it will show all the menu. When I select 'SELECTED' checkbox it will show only the menu which was selected 'UNSELECTED' checkbox will show only the menu which i was not selected. I also have SELECTALL checkbox which should select only the displaying menu that was showing when we select any of three checkbox. I had written the function for the All, Selected, Un-selected to show the menu when I select. But I can't select the particular menus which was showing by selecting the SELECTALL check box. please resolve my problem. Thanks in advance.
$("#selectAll").click(function() {
if($("#All").is(':checked')){
$('.MenuClass').prop('checked',true);
$('.MenuHidden').val('Y');
}
else if($("#Selected").is(':checked')){
if($('#Menu).css('display') == 'none'){
$('.MenuClass').prop('checked',true);
$('.MenuHidden').val('Y');
}
}
else if($("#UnSelected").is(':checked')){
if($('#Menu).css('display') == 'none'){
$('.MenuClass').prop('checked',true);
$('.MenuHidden').val('Y');
}
}
}
Aucun commentaire:
Enregistrer un commentaire