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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:50:29+00:00 2026-05-11T19:50:29+00:00

I am new to jQuery and already I’m seeing problems with the built in

  • 0

I am new to jQuery and already I’m seeing problems with the built in
slideDown()/slideUp() animations. I’m using a flexible width
element, and when I use the function, the element does not return to
it’s full width. I am thinking this has something to do with the way
jQuery finds the width of the element. I am experiencing the error in Safari 3 and Firefox 3.1 for OS X. Below is the html for the page:

<div id="archive">
    <h2 class="first open">May</h2>
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="list">
         <tr class="first">
              <td width="65%"><a href="#">This month</a></td>
              <td align="right">Sunday, May 31   <input type="button" value="Edit"/></td>
         </tr>
    </table>
</div>

And the Javascript:

// Enable month names to re-open divs
$("#archive h2").not(":last").wrapInner("<a href='#'></a>").end().find
("a").click(function(event){

event.preventDefault();

var h2 = $(this).parent();

if (h2.hasClass("open")) { // Close

    h2.removeClass("open");
    h2.next().slideUp("fast");


} else { // Open

    h2.addClass("open");
    h2.next().slideDown("fast");


}

});

The problem can be somewhat solved by wrapping the in , but then a new error occurs in Firefox where the slideDown animation jumps near the end.

Any help would be appreciated.

Thanks,
Brendan

  • 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-11T19:50:29+00:00Added an answer on May 11, 2026 at 7:50 pm

    So it turns out the fix was to nest each table in a div, then set the table width to a static width. In my case, “600px”. I did some experimenting and as I remember, when jQuery finds the height of an element, it sets it to position: abolsute; visibility: none;, which in my case left the 100% width with nothing to compare itself to, rendering as something like 100px wide, and taller than it should have been. So jQuery animated to that height, then set everything back to normal, causing the browser to snap back to the real height.

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

Sidebar

Related Questions

I am relatively new to using jQuery and would like to use the load
I am new to jQuery.just learn and use it for 3 weeks until now.
New to javascript/jquery and having a hard time with using this or $(this) to
I'm new to jquery and asp.net so please forgive if this is an obvious
I'm new to jQuery so hopefully there is an easy answer to this. I
i'm relatively new to jquery and javascript and am trying to pass a unique
I am new to JQuery. I'm reading JQuery in action, but only up to
So I am pretty new to JQuery and just spent 5 hours getting this
Ok, I am new to JQuery, I have a modal that has a asp:Literal
Thanks for reading. I'm a bit new to jQuery, and am trying to make

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.