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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:17:13+00:00 2026-05-23T13:17:13+00:00

I am building a custom jQuery plugin which allows the user to delete records

  • 0

I am building a custom jQuery plugin which allows the user to delete records within a table in real-time, among many other things. When the records are deleted, I would like the the background-color of the deleted table row to turn red, then slide up out of view.

Here is a snippet of my code below, which doesn’t do any of the color changing animation, nor does it slide up the row. However, it does delete the row when what is supposed to be the slide up animation, finishes. Some things to know when reviewing the code below:

  1. The “object” variable is a jQuery reference to the object which was clicked and triggered the delete operation.
  2. The “object.parent().parent()” object is the row which is being deleted.
  3. The “deleteHighlight” CSS class contains the color which will turn the row a red color.
  4. The “addClass” method uses jQueryUI’s “addClass” method, not jQuery’s. It allows an animated effect and a callback.

object.parent().parent().addClass('deleteHighlight', 1000, function() {
//Fold the table row
  $(this).slideUp(1000, function() {
  //Delete the old row
    $(this).remove();
  });
});

Here is the HTML on which this is being executed, nothing special:

<table class="dataTable">
<thead>
<tr>
<th>&nbsp;</th>
<th>Title</th>
<th>Content Snapshot</th>
<th>Management</th>
</tr>
</thead>

<tbody>
<tr class="odd" id="11" name="1">
<td class="center width50"><a class="dragger"></a><a class="visibilityTrigger eyeShow"></a></td>
<td class="center width150">Title</td>
<td>
<div class="clipContainer">Content</div>
<div class="hide contentContainer">Content</div>
<div class="hide URLContainer">my-url</div>
</td>
<td class="center width75"><a class="edit"></a><a class="delete"></a></td>
</tr>
</tbody>
</table>

Could someone please provide an example of how I can fix this?

Thank you for your time.

  • 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-23T13:17:14+00:00Added an answer on May 23, 2026 at 1:17 pm

    I suspect this is partly a browser issue.
    You shouldn’t really target <tr />‘s since browsers interpret them differently. Additionally they behave differently than block elements.

    In this example: http://jsfiddle.net/lnrb0b/3t3Na/1/ your code works partially in chrome. The <tr /> is allowed styling (unlike in some IE versions) but you can’t animate it. If you make it display:block no worries, but then it’s a bit rubbish as a table 🙂

    In this example: http://jsfiddle.net/lnrb0b/3t3Na/2/ you’ll see I’ve animated the <td />‘s but they barely work and painfully slowly at that.

    Have a test of those and I’ll try think of a solution in the meantime.

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

Sidebar

Related Questions

I have a jquery tab control in which I am building a custom control
I am new to jQuery and I am building a custom plugin, it looks
I am building a custom jQuery plugin for a project I am working on.
I'm building a custom RTE that converts user input to a homebrewn markup, now
I'm building some objects that will trigger custom events, and I'm using jQuery's bind
I'm a newbie to the jQuery UI plugin and I'm building a demo application
I'm building a custom pulldown menu in jQuery. Now I'd like to set the
I'm building a custom slideshow for a project written with jQuery. Each slideshow has
I have read several documentations about building custom ErrorHandler (by inheriting from IErrorHandler). Unfortunately,
I asked a question about building custom Thread Safe Generic List now I am

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.