Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

523
Views
How to select all table rows (tr) that contained a class (jquery)

I have a table (#tbLog) and need to select all table rows (tr) that contain a class called private.

Thanks

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Simple enough:

$("#tbLog tr.private").action();

If you have sub tables (why?), then use this instead to only select the top level trs

$("#tbLog > tbody > tr.private").action();

Note that I've included tbody in the selector as nearly all browsers will add this tag for you (it's part of the spec).

over 4 years ago · Santiago Trujillo Report

0

This how it's done:

$('#tbLog tr.private')
over 4 years ago · Santiago Trujillo Report

0

This way?

$("table#tbLog tr.private")
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!