tags:

views:

226

answers:

1

I have the following jQuery:

$(this).closest('div.mcoup').find('div.delcoup').slideToggle(400)
.siblings().children('div.delcoup').slideUp(400);

What I'm trying to do is get the siblings of the div.mcoup element then find all children of the siblings with the class .delcoup then slide them up.

Is this possible?

+2  A: 

"Get the siblings of div.mcoup"

$("div.mcoup").siblings();

"Then find all children with the class .delcoup"

$("div.mcoup").siblings().find(".delcoup");

"Then slide them up"

$("div.mcoup").siblings().find(".delcoup").slideUp();

If I understood you correctly...

Jonathan Sampson
Looks good, but the hard part is excluding $(this) one, no?
ivannovak
I was going based on your description alone. If you are iterating over several objects, then you can add the `$(this)` to the code.
Jonathan Sampson