Thank you for the reply. I would like to show hide the div located right after the h3 when a.classa is clicked, and not all other div.classdiv located on other lines. Thanks again
On Jun 17, 2:19 pm, waseem sabjee <waseemsab...@gmail.com> wrote: > do you want to toggle the class on the div or toggle a transition like > slideToggle or fadeToggle ? > > On Wed, Jun 17, 2009 at 11:16 PM, FrenchiINLA <mamali.sohe...@gmail.com>wrote: > > > > > I have several following html code: > > <h3><a class="classa"></a></h3><div class="classdiv></div> > > <h3><a class="classa"></a></h3><div class="classdiv></div> > > <h3><a class="classa"></a></h3><div class="classdiv></div> > > etc > > I would like toggle div.classdiv when a.classa is clicked > > > I tried $(this).parent('h3').siblings('div.classdiv').toggle(); > > but all div all toggled. Any help would be greatly appreciated