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

156
Views
How Do I Access a Element From Within Another Element In a Table?

I'm building a website and I need to access an element with a specific class name from another element (all in a table) but I have used this class name within other groups.

<table>
   
    <tr><th>Name</th></tr>

    <div class="one">
    <tr><td>Object 1</td></tr>

<tr><td>
    <div class="hair">Black</div>
</td></tr>


    <div class="two">
    <tr><td>Object 2</td></tr>

<tr><td>
    <div class="hair">Brown</div>
</td></tr>

</div>





</table>

How would I access the hair for solely Object 1 and console.log it? Everything works when it's not in a table but when I add the table tag, it doesn't work.

Could someone please provide a solution? Thank you so much!

about 4 years ago · Juan Pablo Isaza
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!