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

The Archive Base Latest Questions

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

this is my first time posting on here and have read alot of helpful

  • 0

this is my first time posting on here and have read alot of helpful stuff over the past few weeks since I found the site!

So, my question is: I have the following code on my site and what im trying to do is…

  • When an element (.btn-leavecomment) is clicked,

  • a hidden div (#commenttype) is revealed via slideDown.
    This hidden div contains two radio buttons.

  • On click/selection of the ‘first’ radio button (.reveal_ccform) I would like another hidden div to be revealed (I have this all working up to here)

  • I’d then like the first hidden div (which contains the radio buttons (#commenttype)) to then disappear and fadeOut (once the user has selected only the first radio button of the two. The second radio button redirects to another page in case you were wondering.)

Can anyone help with getting that last point (to fadeOut the first hidden div) on click of the first radio button?

Thank you

My Code:

$(document).ready(function(){

  // Click first element (.btn-leavecomment)
  // and reveal first hidden DIV (#commenttype)
  $(".btn-leavecomment").toggle(function(){   
        $("#commenttype").stop().animate({ down: "+=300" }, 3000)      
        $("#commenttype").stop().slideDown("slow");
   }, function(){
        $("#commenttype").stop().animate({ down: "-=300" }, 1400)      
        $("#commenttype").stop().slideUp("slow");  
  });     


  // on click of first radio (.reveal_ccform)     
  // Reveal second hidden DIV (ccform_container) 
  $(".reveal_ccform").toggle(function(){   
  $("#ccform_container").stop().animate({ down: "+=600" }, 6000)      
  $("#ccform_container").stop().slideDown("slow");    


  //fadeOut #commenttype onClick of .reveal_ccform after #ccform_container slidesDown


}); 
  • 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-16T04:19:27+00:00Added an answer on May 16, 2026 at 4:19 am

    I feel like I must be missing something, because this seems pretty simple compared to what you’re already doing, but here you go:

    $('.reveal_ccform').click(function() {
        $('#commenttype').fadeOut();
    });
    

    ******EDIT****

    For a smoother and more complex animation as per the request in the following comment, do something like this:

    $('.reveal_ccform').click(function() {
        $('#commenttype').animate({height: 0, opacity: 0}, function() {
            $(this).remove();
        });
    });
    

    This will create a custom animation to fade out the div containing the radio buttons while simultaneously reducing the height to zero, which will solve the jumping issue. The callback function removes the div after the animation is complete (not a necessary step, but keeps the DOM in line with what the user is seeing).

    See the result: http://jsfiddle.net/8bCAg/

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

Sidebar

Related Questions

this is my first time posting here, I have a question which I have
this is my first time posting here, although I have gotten many great tips
This is my first time posting a question here, I usually find answers in
first time posting here, Googled for a few hours and I couldn't find anything.
So this is my first time posting here but I'm more or less stumped.
This is my first time posting here, so I apologize in advance for the
This is my first time posting here, but I've found a lot of answers
First time posting here. I have problem about referencing a typedef struct from separate
this is my first time on posting so if I have done anything please
This is my first time posting here. I am using GUI in java for

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.