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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:34:40+00:00 2026-05-24T10:34:40+00:00

the html structure: <div id=test> <form> <input type=radio name=content class=s_code checked=checked /><span>code</span> <input type=radio

  • 0

the html structure:

<div id="test">
   <form>
   <input type="radio" name="content"  class="s_code" checked="checked" /><span>code</span>
    <input type="radio" name="content"  class="s_book" /><span>book</span>
    </form>
   </div>
 <div class="contenta">
 <a href="one/letter_A_1.html">A</a>

<a href="two/letter_B_1.html">B</a>

<a href="three/letter_C_1.html">C</a>

<a href="four/letter_D_1.html">D</a>
</div>
 <div class="contentb">
 <a href="1/letter_A_1.html">A</a>

<a href="2/letter_B_1.html">B</a>

<a href="3/letter_C_1.html">C</a>

<a href="4/letter_D_1.html">D</a>
</div></div>

now, is there a way to get when i checked the book radio, the contentb showing. the contenta is hidden. the default shows is contenta.

  • 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-24T10:34:41+00:00Added an answer on May 24, 2026 at 10:34 am

    You can use toggle, this way you can add more sections if you need to. If you have over 5 sections, I would NOT use this method.

    $('.s_code, .s_book').change(function() {
        $('.contenta').toggle($(this).hasClass('s_code'));
        $('.contentb').toggle($(this).hasClass('s_book'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

html structure: <form method=post id=comment-form accept-charset=UTF-8> <div class=form-item form-type-textfield form-item-name> <input type=text id=edit-name name=name
this is the html structure. <form id=coment....> <div id=name><input....>....</div> <div id=email><input....>....</div> <div id=website><input....>....</div> <div
Given the following XML structure <html> <body> <div> <span>Test: Text2</span> </div> <div> <span>Test: Text3</span>
I have the following HTML structure <div id=test-1-yay></div> ... bunch of code ... <div
I have HTMl structure as follows <div class=comments_options id=comment_2> <span>2 comments</span> </div> In Mootools
i have following html structure. <p class=expandableContent ><span class=label>Computer and Laptop Repairs</span></p> <div style=clear:
Two jQuery questions: 1) Given this HTML structure <div id=tipper class=tiplink><a href='test.html' >Link Text</a>
I have the following html structure <div id=rn_answertext> <p>asdasdasdas</p> <p>asdasdasdas</p> <p>asdasdasdas</p> <h3>asdasdasdas</h3> <div id=test>Content
I have the following DOM structure: /*:DOC += <div id='testDiv' class='testDivClass'><div id='innerTestDiv'></div></div><span id='testSpan' class='testSpanClass'><span
My HTML structure is like this: <div id=parent> <div id=1>Some content</div> <div id=2>Some content</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.