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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:00:28+00:00 2026-06-09T15:00:28+00:00

I have 2 tables. <table border=1 class=a> <tr> <td>Value 1</td> <td>2</td> </tr> <tr> <td>Value

  • 0

I have 2 tables.

 <table border="1" class="a">
            <tr>
                <td>Value 1</td>
                <td>2</td>
            </tr>
            <tr>
                <td>Value 2</td>
                <td></td>
            </tr>
        </table>




        <table border="1"  class="b">
            <tr>
                <td>Value 1</td>
                <td>2</td>
            </tr>
            <tr>
                <td>Value 2</td>
                <td></td>
            </tr>
        </table>

On table #1 I write :

  $(".a td:parent").fadeTo(1500, 0.3);

and the result is :

enter image description here

Notice the green one which wasn’t faded out .

But it doesn’t make sence. I wrote “go to parent – which is the TR and fade it all”

Ok maybe the answer is that because it doesn’t have a value inside while the other 3 td's has.

So I tested (on the second table):

$(".b tr").fadeTo(1500, 0.3);

and it did faded the All TR’s (although the last cell is empty)….

enter image description here

What is going on here?

jsbin : http://jsbin.com/ehacen/1/edit

  • 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-09T15:00:29+00:00Added an answer on June 9, 2026 at 3:00 pm

    The problem is with the first example. According to the API ( http://api.jquery.com/parent-selector/), :parent selects that have content inside them. So the first selector is saying “get all <td>s that have content in them”, so it only selects the first three <td>s. To select all the parents of the <td>s, use this:

    $('.a td').parent()
    

    Hope this clears it up for you!

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

Sidebar

Related Questions

I have a table with expand/collapse javascript acting on the class value assigned to
I have created a php table like so: echo <table border = '0' cellpadding
I have a table as below; <table style=width: 100%; border: solid 1px #666600; min-width:
I have an HTML table with collapsed and adjacent borders and a standard border
I have following CSS: table tbody tr:last-child td { padding-top: 7px; border-bottom: 0; }
I have the following HTML table: <table style=width: 100%;> <tr> <td class=title_bar_left_border></td> <td class=title_bar_middle></td>
I have problems with CSS. The table is creating white border and I do
I have the following CSS in my header: <style type=text/css> table, td { border-color:
I have two tables: table a ida valuea 1 a 2 b 3 c
I am trying to write a class to serialize/deserialize something as simple as: <table

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.