Running a search for html elements based on id, where there may be multiples, does not work:

$('#condition').each(function() {...}

However, if you can apply a specific class to each of those elements you can query the elements based on class, such as:

$('.condition').each(function() {...}

Not sure why.  I have found most of jquery to be pretty solid.  Hopefully it’s not some philosophical programming religion that sneaked in.