[Solved] Can this Javascript function be re-written in jQuery? [closed]


I would have a js array of ids you are checking for,

idToCheck = ['id4735721', 'id4735722', ...];

Then compare them in a for loop.

for(id in idToCheck){
      if($('#'+idToCheck[id]).val() != 'NEGATIVE' || if($('#'+idToCheck[id]).val() != 'NEGATIVE DILUTE'){
            checkfinalpass="No";
      }
}

I didn’t redo your whole code but hopefully this will point you in the right direction.

2

solved Can this Javascript function be re-written in jQuery? [closed]