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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:21:51+00:00 2026-06-14T14:21:51+00:00

Im trying to write some jQuery that will hide a tr if two of

  • 0

Im trying to write some jQuery that will hide a tr if two of the td’s contain an element with a certain class. Here is the markup.

<tr>
        <td>Name<i class="icon-warning-sign"></i></a></td>
        <td class="centered_text"><i class="icon-minus"></i></td>   
        <td class="centered_text"><i class="icon-minus"></i></td>
</tr>

So if the last two td’s contain i.icon-minus hide the tr. Which I would do by adding a class to the tr and hidding it. Can anyone help me through this?

  • 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-14T14:21:52+00:00Added an answer on June 14, 2026 at 2:21 pm

    I would write a simple filter like below,

    Which I would do by adding a class to the tr and hidding it. Can anyone help me through this?

    $('#tableId tr').filter(function () {
       return $('.icon-minus', this).length == 2;
    }).addClass('hide');
    

    or Simply

    $('#tableId tr').filter(function () {
       return $('.icon-minus', this).length == 2;
    }).hide();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to write some jQuery code that will highlight the element the cursor
I am trying to write some jquery that will allow me to click two
I'm trying to write some jquery that will go through a specified unordered list
I'm trying to write some jquery that will call a function when an object
I am trying to write some Jquery code that will get the value of
I'm trying to write a function in jQuery that will add a class to
I am currently trying to write some code that will accept some FTP details,
I am trying to write some code that will generate accurate .proto files from
I'm trying to write some JS replicating jQuery's fadeIn and fadeOut functions. Here's the
Alright... I'm trying to write some javascript code that will apply to an html

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.