Is the selector returned ( #box1 , #box2 or #box3 ) if the condition worked, when refining the search using an enumeration, for example, $(".primer", "#box1, #box2, #box3") ?
I .each over elements using .each , for example, like this:
$(".primer", "#box1, #box2, #box3").each(function(i){ любое условие, если элемент ему соответствует, сообщаем об этом }); Question. Does .each , in which of #box1 , or #box2 , or #box3 did the condition work if the search goes inside .each ?
If not, how can we figure this out, except for parent() , parents() and closest() , somehow more cleverly?