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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:50:53+00:00 2026-05-17T21:50:53+00:00

I have a span which contains 2 radio buttons and 2 labels. When a

  • 0

I have a span which contains 2 radio buttons and 2 labels. When a user selects a specific value from a drop down list it is not applicable to have the radio buttons showing so I fade them out. Again when a different value is selected I fade them back in.

When I fadeOut the span which contains them the text input box on the right of the span jumps left to fill the empty space. How can I get the text input box to slide to the left instead of jumping when the span is hidden and also slides back to the right when the span is faded in?

The id of the text input box is responseInput.

    $("#logicSelect").change( function(){
    if($("#logicSelect").val() == 10 || $("#logicSelect").val() == 9){
        $("#checkBoxes:visible").fadeOut();
        $("#newReponseRadio").val("false");
        $("#existingResponseRadio").val("true");
    }else{
        $("#checkBoxes:hidden").fadeIn();
    };
});

EDIT 1:

A brief update. I tried to do the slide and fade but its not working very well.

    if($("#logicSelect").val() == 10 || $("#logicSelect").val() == 9){
        $("#checkBoxes:visible").animate({
           opacity: 0
           }, 2000, function(){
            $("#checkBoxes").hide("slide", { direction: "left" }, 2000);
        });
    }else{
        $("#checkBoxes:hidden").animate({
           opacity: 100
           }, 2000, function(){
            $("#checkBoxes").show("slide", { direction: "right" }, 2000);
        });
    }

Firstly when it does the fade out animation it works fine. When I do the fade back to 100% its instant and not gradual. Also when it does the slide the input box decides to jump the next line and back again for some strange reason as if its resizing the elements. Any ideas? I’ve only just started doing JQuery today so if I’m being dense let me know.

EDIT 2:

Just doing the slide on its own without the other functions causes the element checkBoxes to jump to a new line all the time. Why is the span jumping lines?

EDIT 3:

Okay just to make things clear. I have 3 drop downs, the span with the radio buttons (which I’m trying to fade and slide) and then a final drop down list. When I do the sliding the span and the final drop down always go to a new line? so i’m stuck at this point at the moment.

  • 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-17T21:50:54+00:00Added an answer on May 17, 2026 at 9:50 pm

    With fadeOut, once the opacity reaches zero, jQuery will set the display of the element to none. That’s what’s causing the “jump.” My approach would be to directly animate the opacity rather than using “fadeout” (so the element still takes up space even though it’s invisible), then chain that with a slide on the element that is now invisible.

    Edit: hide(“slide”) essentially does what you want: jsfiddle

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

Sidebar

Related Questions

No related questions found

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.