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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:13:29+00:00 2026-06-01T23:13:29+00:00

I use the following code to slide down a row, but jQuery enforces display:

  • 0

I use the following code to slide down a row, but jQuery enforces display: block on the row, when it’s supposed to be table-row, breaking the styling.

Fiddle: http://jsfiddle.net/7Ay3z/

I manually set it to table-row after it’s complete, but that is horrendous. How can I work around this?

<style>
table {
    margin: 25px;
}
tr {
    background-color: #c00;
    color: #fff;
    border: 1px solid #000;
    padding: 10px;
}
</style>
<table>
    <tr>
        <td>a</td>
        <td>b</td>
        <td>c</td>
        <td>d</td>
        <td style="display:none;">1</td>
    </tr>
</table>

jQ:

$("tr").click(function(){
    var row = $(this);
    var visibleLength = row.find("td:visible").length;
    var hiddenLength = row.find("td:not(:visible)").length;
    var drillRow = $("<tr/>").addClass("drillDownRow");
    var drillColumn = $("<td/>").attr("colspan", visibleLength);
    var drillHidden = $("<td/>").attr("colspan", hiddenLength).css({display: "none"});

    drillColumn.html("test <b>2</b>... ok");

    drillRow.hide().append(drillColumn).append(drillHidden).insertAfter(row);
    drillRow.slideDown("slow",function() {$(this).css({display: "table-row"})});
});
  • 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-01T23:13:30+00:00Added an answer on June 1, 2026 at 11:13 pm

    Try using the animate method instead of slideDown. You’ll need to do a bit more manual definition of the effect you want, but it won’t introduce the display:block that’s giving you trouble.

    Quoted from http://api.jquery.com/animate/:

    Note: Unlike shorthand animation methods such as .slideDown() and
    .fadeIn(), the .animate() method does not make hidden elements visible
    as part of the effect. For example, given
    $(‘someElement’).hide().animate({height:’20px’}, 500), the animation
    will run, but the element will remain hidden.

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

Sidebar

Related Questions

In a jquery hover event I use the following code to drop down a
I use the following code to store user password into a mysql table with
Trying to use JQuery Easing plugin in my wordpress but its giving me following
I use the following code to slide out a div on a mouse-over, wait
The following attempt works in IE8 but not in Firefox (cannot use JQuery for
I use following code: Create a retry policy, when error, retry after 1 second,
I use VS2010, C# to develop Silverlight 4 app, I use following code in
I have an array of objects, and i use following code to get in
I am using wxWidgets 2.9.2, when i use following code //ToolBar wxToolBar *mainTool =
I use the following code for retrieve the data from my Sql DB.retrieve StudName

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.