$('.mutliSelectBase').on('click', function () {
var checkCount = 0;
var totCount = 0;
$(".multiValuesBase li").each(function () {
if ($("input[name='bidCheckBase']", this).prop("checked")) {
checkCount = checkCount + 1;
}
totCount = totCount + 1;
});
if (totCount - 2 == checkCount) {
($("input[id='bidCheckAllBase']", $(".mutliSelectBase")).prop("checked", true));
}
else {
($("input[id='bidCheckAllBase']", $(".mutliSelectBase")).prop("checked", false));
}
$("#ddlBaseDetails").find("option").remove();
$("#ddlBaseDetails").append("<option value='0'>" + checkCount + " Selected</option>");
});