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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:22:44+00:00 2026-06-16T13:22:44+00:00

I want to display a hidden div based on a selected radio button, for

  • 0

I want to display a hidden div based on a selected radio button, for example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $(".option_select").click(function() {
            if ($('#extra_options').is(":hidden")) {
                $('#extra_options').slideDown("slow");
            }      
        });
    }); 
</script>        
</head>

<body>
<div id="extra_options" style="display:none;">
<input type="radio" name="ExtraOption" value="1" /> Extra option 1<br />
<input type="radio" name="ExtraOption" value="2" /> Extra option 2<br />
<input type="radio" name="ExtraOption" value="3" /> Extra option 3<br />
</div>

<form action="#" method="post">
<input type="radio" name="Option" class="option_select" value="1" /> Option 1<br />
<input type="radio" name="Option" class="option_select" value="2" /> Option 2<br />
<input type="radio" name="Option" class="option_select" value="3" /> Option 3<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

But I’d really like to attach that #extra_options div to the selected radio button (“Option 1, Option 2, Option 3 etc), so it looks more like “these extra options go with this option #”. I figured I could have a #extra_optionsX div attached to every single radio button but I figured there was a better way then that. Any ideas?

TIA

  • 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-16T13:22:45+00:00Added an answer on June 16, 2026 at 1:22 pm

    You can append it using

    if ($('#extra_options').is(":visible")) {
        $('#extra_options').hide();
    }
    $(this).next().after($('#extra_options'));
    $('#extra_options').slideDown("slow");
    

    (edit: added hiding/showing when changing selected options)

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

Sidebar

Related Questions

Given this last thread: Javascript/Jquery: Show a hidden div based on a Radio box
I want to hover a header that I created in html to display hidden
I did hidden eclipse main menu. I want to display all item of eclipse
How to make div invisible to still able to click? display hidden or hide()
I am trying to display a hidden div in colorbox using an <a> link's
Greetings, Assume that I have such hidden div: <div id=option-dialog style=display:none;> <a href=# value=1>First</a>
High everyone, In my web-based app, I have a div that is usually display:none
I want to use jQuery's fadeToggle() function. I have a hidden div and when
I'm pretty new to Jquery and i want to have a hidden div css:
I want to show hidden div on hover of <div class=thumb> and i have

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.