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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:35:44+00:00 2026-05-25T15:35:44+00:00

<table> <tr><td>First Row</td><td>2 Row</td><td>1 last</td></tr> <tr><td>Middle Row</td><td>2 Row</td><td>2 last</td></tr> <tr><td>Last Row</td><td>2 Row</td><td>3 last</td></tr> </table>

  • 0
  <table>

    <tr><td>First Row</td><td>2 Row</td><td>1 last</td></tr>
    <tr><td>Middle Row</td><td>2 Row</td><td>2 last</td></tr>
    <tr><td>Last Row</td><td>2 Row</td><td>3 last</td></tr>

  </table>


$('tr').each(function(index) {
    $("td:last").css({backgroundColor: 'yellow', fontWeight: 'bolder'});
  });

LIVE: http://jsfiddle.net/DxVG5/1/

why this working only for 3 last, but on 1 last and 2 last no? how can i fix it?

  • 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-25T15:35:45+00:00Added an answer on May 25, 2026 at 3:35 pm

    You need to add the context of the td, you’re already in a for loop so the ‘this’ variable can be used. In this context ‘this’ is equal to the tr you’re currently iterating on.

    $('tr').each(function(index) {
        $("td:last",this).css({backgroundColor: 'yellow', fontWeight: 'bolder'});
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my html table I have two row, first row having no css but
I have a table with 3 rows. Each row has 3 td. The first
I am trying to move the last row in a table to the first
I want to delete some data displayed in a HTML table row (first on
The first row in my table has three cells. I'm trying to set up
I have a table for which I want to display only the first row
Is it possible to display all but first row from a table in sql
I have a DataSet , where in the first table and in the row
First i gave all values of row in JTAble. While inserting table values into
<table> <tbody> <tr class=row-1 row-first> <td><div class=inside>Text</div></td> <td><div class=inside>Text</div></td> <td><div class=inside>Text</div></td> </tr> <tr class=row-2>

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.