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

  • Home
  • SEARCH
  • 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 3690528
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:02:43+00:00 2026-05-19T04:02:43+00:00

I am trying to add some jQuery to a WordPress site so that when

  • 0

I am trying to add some jQuery to a WordPress site so that when a user selects a certain option (Software) in the top dropdown menu, another appears under it.

I am using the following code –

<p id="parent-menu">
    <select name='cat' id='cat' class='dropdown'  tabindex="40">
        <option value='-1'>Select a Category</option>
        <option class="level-0" value="13">Software problem</option>
        <option class="level-0" value="14">Hardware problem</option>
        <option class="level-0" value="15">Suggestion</option>
        <option class="level-0" value="16">General query</option>
    </select>
</p>
<p id="toggle-menu">
    <select name='cat' id='cat' class='dropdown'  tabindex="50">
        <option value='-1'>Select a Program</option>
        <option class="level-0" value="6">BigHand</option>
        <option class="level-0" value="7">IRIS</option>
        <option class="level-0" value="8">MS Outlook</option>
        <option class="level-0" value="9">MS Word</option>
        <option class="level-0" value="10">MS Excel</option>
        <option class="level-0" value="11">Oyez</option>
        <option class="level-0" value="12">Internet Explorer</option>
    </select>
</p>

Id be greatful if someone could help me to do this.

Thanks.

  • 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-19T04:02:43+00:00Added an answer on May 19, 2026 at 4:02 am

    I am not exactly sure on how wordpress handles JQuery but if I was writing this in PHP it would be something like. I would change taxonomy to id or value. And the query would go inside my button click. You would need to change your id for each click instance.

    $(".class#id").toggle();
    $(".dropdown#software").toggle();
    

    ok. So on your new info. Since there is a specific id I can use. You will need to include something to check your code page for when the option 13 is selected. When that option is selected you would need something like this.

    $("#toggle-menu").toggle();
    

    or

    $("#toggle-menu").show();
    

    Now the idea here is that if you have this action or event based on selection of option using toggle() will show or hide toggle-menu depending on the selection, ie i selected it once it will appear, i deselect or select it again menu disappears. Using show() will make the toggle-menu appear but not hide it if deselected, in which case you would want to use a hide() in all other event selections to hide the toggle-menu

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to add some JQuery to an ASP.Net User Control to check to
I'm trying to add some jQuery stuff to Gmail using a GreaseMonkey script. Adding
I am new to JQuery. I am trying to add some code in my
I have an html table that I am trying to add some animation to
I am trying to add some custom build steps to my headless build process
I'm trying to find a way to automate some exception logging code to add
I'm trying add a tab to my web page that looks like this: Using
trying to add an ExpiresDefault ExpiresByType to content on my website so that way
I am trying to add some additional html to a div with id slideshow
I'm trying to add some custom data within a tag to reference later in

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.