[jQuery] Re: manipulate the next element with a class

2009-07-15 Thread Jules
Opps, after re-reading the original post it should be $(this).parent().next().find(".a1").css({ "visibility": "hidden" }); However, this only works for #container1 .link1 and #container2 .link1. If you click #container3 .link1, nothing happens. On Jul 16, 10:24 am, Jules wrote: > It should be s

[jQuery] Re: manipulate the next element with a class

2009-07-15 Thread Jules
It should be siblings() not find(). On Jul 16, 8:00 am, Benn wrote: > Is there a non-structure specific way of finding the next element with > a given class? for example you have a structure of: > > >   link >   asdf > > > >   link >   ghjl > > > >   link >   qwer > > > When you click on t

[jQuery] Re: manipulate the next element with a class

2009-07-15 Thread Brett Ritter
On Wed, Jul 15, 2009 at 6:00 PM, Benn wrote: > > Is there a non-structure specific way of finding the next element with > a given class? Try this out (Haven't tested, but the find() method is probably what you are looking for) $(document).ready(function(){ $(".link1").click(function(){ $(t