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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:45:13+00:00 2026-06-05T07:45:13+00:00

I have a table and when the user clicks on a row it’s highlighted

  • 0

I have a table and when the user clicks on a row it’s highlighted yellow. I use a class to set the color using CSS, as in:

.highlight {
    background-color: yellow; 
}

Now, when the user clicks a submit button, I want to get all the highlighted rows, then get a specific column value from that row, and then put them into an array. I’m missing something though as my selector isn’t putting any row data in the array.

var arr = $('#tbl tr').filter(":has(.highlight)");

This is what I used in another function to get the value from a single row when the user clicked on it. The code below works, but I need to do this for all the highlighted rows.

$(this).find('#selectedRowItem').text()

I’m using jQuery 1.6.4. by the way.

Also, I was looking into using the data function to cache it as a better alternative, but opted for an array as a easier solution.

Any ideas as to how to do 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-05T07:45:15+00:00Added an answer on June 5, 2026 at 7:45 am
    var $highlighted = $('#tbl tr.highlight');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table row that has background color on hover. When user clicks
I have a table cell, and when the user clicks on it, I replace
I have a table which has 5 rows. When a user clicks on a
I have a table-row that has a JavaScript action attached to mouse clicks anywhere
I have a table where the user clicks a check box to select a
I have a table in which any time a user clicks on one of
I have a table set up such that each row has a checkbox as
I have a table where each row has a CSS id like this: <table>
I'm attempting to activate table row checkbox when the user clicks within a table
I have table with following structure Whenever user click on checkbook and click on

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.