Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 564699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:47:40+00:00 2026-05-13T12:47:40+00:00

HTML: <ul class=parent> <li><a href=#>toggler</a> <ul class=child> … </ul> </li> </ul> I’d like to

  • 0

HTML:

<ul class="parent">
   <li><a href="#">toggler</a>
       <ul class="child">
       ...
       </ul>
   </li>
</ul>

I’d like to toggle ‘child’ UL (if it exists) via ‘toggler’ link. There might me multiple parent>child elements so I’d like to toggle the relevant child only.

Thanks in advance for your help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:47:40+00:00Added an answer on May 13, 2026 at 12:47 pm

    The UL is not a child to the anchor, but using next() is simple enough:

    $('ul a').click(function() {
         $(this).next().toggle();
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the follwing HTML <ul class=shopp_categories> <li class=current> <a class=current href=link>Gifts For Her</a>
i am having a html structure like <ul> <li> <span class=vcard> <a class=underline user-link
Fiddle is here - http://jsfiddle.net/ashwyn/a45ha/ HTML here - <div class=parent> <div class=a>Class A</div> <div
Is there any html form class(text box) that does not allow null values. The
Is there anyway to retrieve a HTML element's class or ID in the controller
HTML: <ul id=mode> <li><a href=#tab1>tab1</a> <div class=extra>tada</div> </li> <li><a href=#tab2>tab2</a> <div class=extra>tada</div> </li> </ul>
HTML: <ul> <li><a href=#tab1>tab1</a></li> <li><a href=#tab2>tab2</a></li> </ul> <div id=tab1 class=tab-content>content 1</div> <div id=tab2 class=tab-content>content
HTML: <div class=tabbed-section> <ul class=tabs> <li><a href=#tab-1>Tab 1</a><li> <li><a href=#tab-2>Tab 2</a><li> </ul> <div id=tab-1
Suppose the following HTML: <li class=fooli> <a class=foo href=javascript:foo(this);>anchor</a> </li> <li class=fooli> <a class=foo
Html code is: <div id=questions> <ul> <li class=selected><a href=#fly>Fly</a></li> <li><a href=#fly1>Fly 1</a></li> </ul> <div

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.