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 7983467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:57:55+00:00 2026-06-04T10:57:55+00:00

There is my code <input type=radio name=category id=elementary value=elementary /> 1 <input type=radio name=category

  • 0

There is my code

<input type="radio" name="category" id="elementary" value="elementary" /> 1
<input type="radio" name="category" id="junior" value="junior" /> 2
<input type="radio" name="category" id="senior" value="senior" /> 3
<input type="radio" name="category" id="university" value="university" /> 4
<input type="radio" name="category" id="profession"/> 5

<div id='grade_select' class="clearfix">
  <div id='elementary_grade' class="clearfix"></div>
  <div id='junior_grade' class="clearfix"></div>
  <div id='senior_grade' class="clearfix"></div>
  <div id='university_grade' class="clearfix"></div>
  <div id='profession_grade' class="clearfix"></div>
</div>

I want:

When check one radio, need to hide all the div in grade_select, and then show the div which id include the current radio value

There is my js code , I do not know how to going on

   <script type="text/javascript">
    $(document).ready(function($){
      $( "input[name='category']" ).bind( "click", category_select)
    });
    function category_select(){
        $("div:[id=this.attr[id]]).show()
    }
    </script>

FYI: This question is a spinoff of this other question.

  • 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-06-04T10:57:57+00:00Added an answer on June 4, 2026 at 10:57 am
    <script type="text/javascript">
        $(document).ready(function($){
            $( "input[name='category']" ).bind( "click", function() {
                $("#grade_select div").hide().parent().find( '#' + this.id + "_grade" ).show();
            });
        });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There is a radio button group define as below: <input type=radio name=type0 value=$>$<input type=radio
Radio box code: <input type = radio name = choice value = A />Apples
the html structure: <div id=test> <form> <input type=radio name=content class=s_code checked=checked /><span>code</span> <input type=radio
If I have the following code : <li> <span class=radio_appt> <input id=color1 type=radio name=ctl00$cph1$appointment
I have some test code here <input type=radio name=group1>1 <input type=radio name=group1>2 <input type=radio
The default decorator for the Zend_Form_Element_Radio is <label for=type_id-1><input type=radio name=type_id id=type_id-1 value=1>Pack</label> The
Can somebody help me with this. There is HTML code: <h3> <label> <input type=checkbox
I'm writing some code that highlights all <input type=radio /> within a radio group
I have a form with two radiobuttons: [radio1] [radio2] [select] <input type=radio id=radio1 name=radio
In the code there exists exactly one type that implements IResourceConverter. That's what the

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.