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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T10:20:47+00:00 2026-06-02T10:20:47+00:00

I am having two radiobuttons, <div class=class1> <span><input name=chk1 type=radio checked=checked id=check1/>Option 1</span> <span><input

  • 0

I am having two radiobuttons,

<div class="class1">
<span><input name="chk1" type="radio" checked="checked" id="check1"/>Option 1</span>
<span><input name="chk2" type="radio" id="check2"/>Option 2</span>
</div>

Now, i am displaying a hidden div using Jquery when the radio button with an ID check1 is cliked and hiding the same div when the radio button with an ID check2 is clicked, here is the code for that,

$(document).ready(function(){
    $("#check1").click(function(){
                                            $("#detail").slideDown("slow");
    });


    $("#check2").click(function(){ 
                                            $("#detail").slideUp("slow");
    })
}); 

My problem is, when an ID check1 is clicked(Div is displayed now) and the values are posted to the server and while return back to the same page, the div is not getting displayed, even though the option check1 is clicked. Is there any other way to retain the div using attr :checked or something? Appreciate 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-06-02T10:20:50+00:00Added an answer on June 2, 2026 at 10:20 am
    $(document).ready(function(){
        if ($("#check1:checked").length) {
            $("#detail").slideDown("slow");
        }
    
        $("#check1").click(function(){
            $("#detail").slideDown("slow");
        });
    
    
        $("#check2").click(function(){ 
            $("#detail").slideUp("slow");
        })
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble with a simple radio set of two radio buttons (I don't
Suppose I am having two Strings as follows : String name = EXAMPLE_MODEL_1; String
Having two projects: one is a class library (a .dll assembly) and the other
Having two lists of same object type. I want to join them using an
I am having two entities BusinessUser { Id(PK), Name,...} Login { BusinessUserID(PK, FK), Email,
I'm having trouble submitting radio button values. I have two radio buttons set up
I want to make a custom List View having Two TextViews and a radio
Having two simple classes taking Int as an argument: case class Foo(i: Int) class
I am having two radio buttons of label 'Text Mode' and 'Html Mode'. If
Hai Freinds I am having two textbox name empame,empid i n that i am

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.