$(".classa").click(function () { $(this).parent().next(".classdiv").toggle(); }); FrenchiINLA wrote: 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 againOn 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 clickedI tried $(this).parent('h3').siblings('div.classdiv').toggle(); but all div all toggled. Any help would be greatly appreciated |
- [jQuery] First Parent Siblings FrenchiINLA
- [jQuery] Re: First Parent Siblings waseem sabjee
- [jQuery] Re: First Parent Siblings FrenchiINLA
- [jQuery] Re: First Parent Siblin... Charlie
- [jQuery] Re: First Parent Siblings Mauricio (Maujor) Samy Silva