I assume you are thinking of an βorβ concept. Unfortunately, this really does not exist in jQuery / CSS selection. You need to make an βorβ for all choices:
$('div.item > div.id > :input, div.item > div.quantity > :input')
If you are not using live , the easiest way to do this is to bypass the DOM:
$('div.item').children('div.id, div.quantity').children(':input')
Since you are using live , the first example is probably the easiest method.
source share