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

  • Home
  • SEARCH
  • 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 9232237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:15:58+00:00 2026-06-18T06:15:58+00:00

Earlier I asked the following question on how to add a HTML table row

  • 0

Earlier I asked the following question on how to add a HTML table row using JQuery, knowing the id on an element inside a table cell.

So, after adding the new row, the table look like this now:

<table id = "mytable">
  <tr>
     <th>Hiring Manager</th>
     <td><textarea id = "textComments" cols = "15"/></td>
  </tr>
  <tr>
     <td></td>
     <td>
        <span class = "CharCounter">
           <span id="lblCharCounter">Label</span>
           characters (500 max)
        </span>
     </td>
 </tr>

I want to know, knowing the id of the first element (i.e. textComment), how can I select the second element located in the row below, (i.e. lblCharCounter)?

Thank for helping

  • 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-18T06:15:59+00:00Added an answer on June 18, 2026 at 6:15 am

    I would probably go with:

    $('#textComment').closest('table').find('.CharCounter')
    

    or (to get that specific sub-span)

    $('#textComment').closest('table').find('.CharCounter').children()
    

    or something similar — It’s easiest if you assign a unique class, in addition to the ID, to that element you want to locate.

    http://api.jquery.com/closest

    http://api.jquery.com/find

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

Sidebar

Related Questions

Earlier I asked this question ( and after some googling I read Using your
I asked this question earlier, and after thinking about the topic some more, I
My question relates to this question asked earlier. In situations where I am using
I see that the above question was asked earlier, however even after referring them
I'm going to repeat a question I asked earlier but I need help using
So earlier I asked this question: JQuery Login Redirect. Code Included The php file
Following up from an earlier question I asked about, I'm trying to read data
I asked a question earlier about a way of highlighting tables using JavaScript and
So I asked a question earlier about retrieving high scores form an html page
I asked the following question earlier and @topek answered it perfectly. However, I thought

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.