I have the following function in my jQuery code:
function checkUNSelectBox(item){
$('#DELETE option').each(function(){ <!--alert(item);-->
if ($(this).val() !=item) {
$(this).attr("disabled", "disabled");
return false;
}
});
}
However, only the first item in the list is being disabled instead of all the rest that are not equals to “item”. Why is this so?
don’t need to
return falsein function you just remove it.just check it out in Demo