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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T22:49:54+00:00 2026-05-15T22:49:54+00:00

How can we hide the column of the table by using jquery < table

  • 0

How can we hide the column of the table by using jquery

< table >
  < tr >
   < td id="td_1" >name</ td >
   < td id="td_2" >title</ td >
   < td id="td_3" >desc</ td >
  </ tr >
  < tr >
   < td id="td_1" >Dave</ td >
   < td id="td_2" >WEB DEV</ td >
   < td id="td_3" >Blah Blah</ td >
  < /tr >
  < tr >
   < td id="td_1" >Nick< /td >
   < td id="td_2" >SEO< /td >
   < td id="td_3" >Blah Blah and blah< /td >
  < /tr >
< /table >

So suppose if someone want to hide first column i.e. td_1 from all rows, then what will be the code ?

Thanks in Advance
Dave

  • 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-15T22:49:55+00:00Added an answer on May 15, 2026 at 10:49 pm
    $(document).ready(function() {
        $("#td_1").hide();
    });
    

    But ideally, you want to use a class instead of an ID.

    so

    <table>
      <tr>
       <td class="td_1">name</td>
       <td class="td_2">title</td>
       <td class="td_3">desc</td>
      </tr>
      <tr>
       <td class="td_1">Dave</td>
       <td class="td_2">WEB DEV</td>
       <td class="td_3">Blah Blah</td>
      </tr>
      <tr>
       <td class="td_1">Nick</td>
       <td class="td_2">SEO</td>
       <td class="td_3">Blah Blah and blah</td>
      </tr>
    </table>
    

    And then you would use similar code:

    $(document).ready(function() {
        $(".td_1").hide()
    });
    

    So the only thing that changed is the hash(#) to a dot(.). Hash is for ID’s, Dot is for classes.

    Yet another way would be to use the nthChild selector.

    $(document).ready(function() {
        $('tr td:nth-child(1)').hide();
    });
    

    Where 1 is the column number to be hidden.

    HTH

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

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You cannot. Either use compiler-specific extensions or Boost's Typeof (which… May 16, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer You have several emulators, all running just this app, closing… May 16, 2026 at 4:36 pm
  • Editorial Team
    Editorial Team added an answer Well, yes. Each sequence container type has a template constructor… May 16, 2026 at 4:36 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a table with some customer data. I am using jquery hover to
Example code: <html> <head> <script src=jquery-1.3.2.min.js type=text/javascript></script> <script src=jquery-ui-1.7.1.custom.min.js type=text/javascript></script> </head> <body> <table border=1
I have an HTML table that looks like this: ------------------------------------------------- |Column 1 |Column 2
I am having check box in the column header. The function of this is
I want to be able to output data from PowerShell without any column headings.
I've a table with lots of columns. I want to give users the option
I'm using the ancestry gem to help organise my app's tree structure in the
I have a gridview that i would like to show or hide a text
Bit of a jquery Newbie here, so go easy. Basically I'm trying to plug
I am wondering if it is possible to clear the cache from a particular

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.