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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:04:13+00:00 2026-05-26T19:04:13+00:00

I am currently adding rows to a table using the .insertAfter() funciton within my

  • 0

I am currently adding rows to a table using the .insertAfter() funciton within my document.

$(document).ready(function () {

            CheckRowLength();
            $("#add").click(function () {
                $('#querytable tr:last').clone(true).insertAfter('#querytable tr:last');
                $('#querytable tr:last #name').val('');
                CheckRowLength();
                return false;
            });

            $("#del").click(function () {
                $(this).parent().parent().remove();
                CheckRowLength();
            });
            function CheckRowLength() {
                var RowCount = $('#querytable tr').length;
                if (RowCount > 2) {
                    $('#querytable tr:last #del').show();
                }
                else {
                    $('#del').hide();
                }
            }
        });

html markup

<table id="querytable">

            <tr>
                <td id="col1">
                    Field Name
                </td>
            </tr>
            <tr>
                <td>
                    <input type="text" name="name" id="name" />
                </td>
                <td>
                    <a id="add">Add</a>
                    <a id="del">Delete</a>
                </td>
            </tr>

    </table>

The effect I would like to obtain is when the row is added have it fade in. I tried to use the fadeIn() function but I am not implementing it correctly as nothing is happening.

$('#querytable tr:last').clone(true).insertAfter('#querytable tr:last').fadeIn('slow');

Can someone please point me in the right direction for this effect. Or is this even possible when used in conjunction with insertAfter?

Thanks in advance

  • 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-26T19:04:14+00:00Added an answer on May 26, 2026 at 7:04 pm

    Wrap the contents of your <td>‘s with a <div>, which you then apply the fade effects to. Here’s a blog post I wrote recently where I was doing the same thing with slide instead of fade:
    http://duncan99.wordpress.com/2011/09/17/using-jquery-to-animate-table-rows/

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

Sidebar

Related Questions

I was looking at adding rows dynamically to my HTML table using jQuery with
I am currently adding hundreds of thousands of rows of data to a table
I have a function that is called on document.ready that loops through a table
Is there a preferred way? There are currently 1640 rows in the game table
I am currently using phonegap and trying to display results from a sqlite table
I am currently using Django Users model. Very simple. However, I'd like to add
Ive got a table with a many rows, currently no fields are unique. I've
I'm using Postgresql with SQLAlchemy but it seems sqlalchemy is having trouble adding rows
I'm currently adding some new extended classes to this code: foreach (BaseType b in
I'm currently adding verbose tooltips to our site, and I'd like (without having to

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.