tags:

views:

37

answers:

1

say i have an e.target

how can i select all other similar e.target elements ?

for instance, e.target would be a link inside a div.

how can i automatically select all links inside this div ?

is there a function that does this ?

+1  A: 

The siblings() call will find all siblings of each item in the set and won't include the item the siblings come from. You can apply a selector to only select specific siblings, in this case all the links:

$(e.target).siblings("a").css("background", "yellow");
cletus