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

The Archive Base Latest Questions

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

I have a table within a checkbox and what I want is, when the

  • 0

I have a table within a checkbox and what I want is, when the checkbox is checked and i press the delete button the table must hide. So I tried this:

$('deleteButton').click(function() 
{
    $('input:checkbox:checked').parents($('table').hide());
});

But it didnt work, I hope someone can help me out with this one?

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:18:59+00:00Added an answer on May 26, 2026 at 7:18 pm

    There are a couple of problems with your code. Firstly, your deleteButton selector would match an element named <deleteButton>, which is obviously not valid. I’m guessing you meant it to be an id selector (#deleteButton) or a class selector (.deleteButton).

    Secondly, this line will hide all of the table elements on your page:

    $('input:checkbox:checked').parents($('table').hide());
    

    The reason for that is you call $('table').hide(), which will hide all of the table elements, and pass the result of that into the parents method (but do nothing with the result of the parents method). I think what you probably meant was to use table as a selector to the parents method:

    $('input:checkbox:checked').parents("table").hide();
    

    However, if the table you want to hide is a descendant of another table further up the DOM, you probably want to use parentsUntil, or you’ll end up hiding the ancestor table too.

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

Sidebar

Related Questions

I have a div within which a table would lie. Now I want this
I have an IFrame with a Table enclosed within it. I want to display
I have a table within a mysql database. What i want to do, is
I have a table within word which is protected, but I want to add
I have a table within repeater. Can I add prefix for this <tr id=<%#DataBinder.Eval(Container.DataItem,DocumentId)%>>
I have a table used within a cshtml page. I have following requirements This
I have a table within a table (inside a td). This child table has
I have a table named PAYMENT . Within this table I have a user
I have a table within another table, that look like below. What I want
I have a table within my database that has many records, some records share

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.