jquery if else, why does not work?
Posted
by Cesar Lopez
on Stack Overflow
See other posts from Stack Overflow
or by Cesar Lopez
Published on 2010-04-26T15:25:44Z
Indexed on
2010/04/26
15:33 UTC
Read the original article
Hit count: 248
In the following function it goes through the if and the else, why is that?
function test(){
$(".notEmpty").each(function() {
if($(this).val() === ""){
alert("Empty Fields!!");
return;
}
else{
AddRow_OnButtonClick('tblMedicationDetail',6);
}
});
}
Is there any if and else statement on jquery that I am not aware of?
Thanks
© Stack Overflow or respective owner