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 values = ['first_value', 'second_value', 'third_value', 'fourth_value']; $('#test1, #test2, #test3, #test4').each(function(index, el) { if($.inArray(this.value, values)) { // do some job; return false; // or break; } });