In the code below, is there a better way to check the condition using jQuery?
if(($(\'#test1\').val() == \'first_value\')||($(\'#test2\').val() == \'second_v
var c=0, b='#test', a=['first_value','second_value','third_value','fourth_value']; for(var i=0; i<4; i++) if($(b+i).val() == a[i]) c=1; if (c) //Do stuff here
This will decrease your code size by 25 bytes;-)