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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:23:59+00:00 2026-06-16T00:23:59+00:00

I have a table that contains another table which I want to remove with

  • 0

I have a table that contains another table which I want to remove with jQuery.
This table is in one of the rows of the original table and I actually want to remove the row.
The original table is a jQuery object with the name table.

<table>
<tbody>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td></td>
        <td></td>
        <td></td>
    </tr>
    <tr>
        <td colspan="3">
            <table>
                <tbody>
                    <tr>
                        <td></td>
                        <td></td>   
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>      
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
</tbody></table>

I have tried different ways like the following 4 examples, but without any success:

if ($(table).is('tr')){
    if (('tr').(':has(table)') $('tr').remove(); 
}

if ($(table, 'tr').has('table')) {
    $(table).find('table').remove();
};

if ($(table, 'tr').has('table')) {
    $('tr').remove();
};

$(table, 'tr').siblings().children('table').remove();

I am not sure whether I am on the right track or barking up the completely wrong tree!!

Any suggestion will be highly appreciated.

  • 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-16T00:24:00+00:00Added an answer on June 16, 2026 at 12:24 am

    This is tested and working fine:

    http://jsfiddle.net/2JfhA/

    $('table').find('table').closest('tr').remove();
    

    what this is doing : first get the first table and then find and child table in it and then remove the closest tr which has this table.

    checkout the fiddle.

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

Sidebar

Related Questions

I have a generated table that contains multiple rows with each row containing a
So currently I have a table in Lua that contains another table (much like
I have a table that contains a record of prioritys that links to another
I have a table (user) that contains user information. I have another table (userview)
I want to have a form that contains a table of fields and some
I have a table which contains a list of categories and and another table
i have table called type which contains data family,individual i want in some pages
I have this table which contains Events, and on a click on its icon
I have a table which contains the following columns: UniqueID remote_ip_addr platform I want
Say that I have a table with a bunch of records, which I want

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.