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

  • Home
  • SEARCH
  • 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 6532639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:01:46+00:00 2026-05-25T10:01:46+00:00

enter code hereThe solution to this is eluding me, and unfortunately so is the

  • 0

enter code hereThe solution to this is eluding me, and unfortunately so is the ability to reproduce the problem outside of the page I’m working on.

My question is this: does anybody have any information on a jQuery height animation (such as slideUp(), slideDown(), or slideToggle()) animating partly then ‘jumping’ the rest of the way, and what causes it?

I have a fiddle here: http://jsfiddle.net/d7tbh/

NOTE: before you vote me down because of the fiddle, please read the rest.

The fiddle represents a working example of what I’m trying to accomplish but unfortunately I cannot reproduce the problem at all. The page I’m working on can’t be posted here for a variety of reasons which is not ideal but nonetheless if anyone has run into this before, just knowing that (and what they did about it) would help.

A more in-depth explanation of the problem:

Same markup and css and script to the fiddle.
Clicking on the .header element slides down the .child element.
However the height of .child animates to the height of one .child-item element, regardless of how many ‘rows’ there are. Once this animation completes, the height of .child jumps to the full height required to hold all the .child-item children.
However on the fiddle, it works fine – any ideas?

P.S I know not posting the rest of the code is a problem but it’s out of my control, I’ve shared what I can and described the problem as best I am able. Hopefully it is enough for someone who has had the same problem before to recognise it and maybe help point to the cause.

  • 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-25T10:01:47+00:00Added an answer on May 25, 2026 at 10:01 am

    This isn’t the best answer but the way I got around this was to put a <br style='clear:both;'/> on the page every 3 child divs, to break the rows manually.

    This fixed the slideDown() animation and made it smooth and stopped it jumping.

    The problem with this fix is that it relies on you being able to print out a <br> every x children (this can be done with js but I used php) and also that it means that if you have a liquid layout, this will break on wider / larger screens but as mine is a fixed layout it makes no odds.

    The code:

    The script and css are unchanged, the only thing I’m doing is putting in a bit of extra markup:

    The PHP I used (the modulus test is all there is to it):

    $count=0;
    do {
      $count++;
      echo '<div class="child-item">etc</div>';
    
      if ($count%3==0)
      {
        //this is the third in this row, print a break
        echo '<br style="clear:both;"/>';
      }
    }while($sqlResults);
    

    How you can accomplish something similar in jQuery:

    var count=0;
    $('.child').each(function(){
        count=0;
        //for each container element, loop through its children
        $(this).children('.child-item').each(function(){
            count++;
            if (count%3==0)
            {
               //this item is the third in a row, print a br.
               $(this).after('<br style="clear:both;"/>');
            }
        });
    });
    

    EDIT: updated fiddle script http://jsfiddle.net/d7tbh/1/

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

Sidebar

Related Questions

I've got this Prototype code to detect Enter pressing in textarea. document.observe('keydown', function(e, el)
I let user enter some code in my Flex3 (Flash 10) app and I
When I enter 9:00 into the Start control, and 16:00 into Finish; the code
I have the following code: int main() { char *sPPhrase[51]; /* Input */ printf(Enter
I want to match a separate word which starts with # character. enter #code
I am working on this small little piece in python and when I run
When I switch tabs with the following code tabControl1.SelectTab(MyNextTab); It calls the tabPage_Enter for
When trying to enter a SQL query with parameters using the Oracle OLE DB
When I enter an object into the DB with Linq-to-SQL can I get the
In Firefox you can enter the following into the awesome bar and hit enter:

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.