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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:44:31+00:00 2026-06-11T06:44:31+00:00

I have an html which contains nested tables: <table …. <tbody … <tr …

  • 0

I have an html which contains nested tables:

<table ....
<tbody ...
<tr ...
    <td class="Field">item1_1</td>
        <td class="Value">
        <table ...
        <tbody...
        <tr
            <td class="Field">0</td>
            <td class="Value">
            <table ...
                ....

The clickable element are the Fields. When the user clicks a field, I need to find the table which contains its table (2 tables up) and check its metadata.
I tried to use:

field.parents("table")[1]

This returns the right table but it doesn’t allow me to query its metadata:

field.parents("table")[1].data("isArray")

Can you please help me figure out how to query the metadata of the containing table?

Thanks,
Li

p.s.
I’ve only managed to do it by using:

field.parent().parent().parent().parent().parent().parent().parent().parent().data("isArray")

but I really want to avoid such ugliness.

  • 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-11T06:44:33+00:00Added an answer on June 11, 2026 at 6:44 am

    The problem you’re having is that array indexing the jquery object will return a dom object. You can instead use eq to get you a jquery object.

    field.parents("table").eq(1).data("isArray")
    

    If you are able to modify the html. An even cleaner approach would be to assign a class to the table you are trying to get and then use closest.

    field.closest(".someClass").data("isArray")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written xml file which contains html tags as element like <component> <input
I have a html page which contains nested frameset (don't ask why, I'm only
I have an html table which contains records, comes from mysql db. Each row
I have html which contains such text ....... <a class=product_name href=index.php?productID=29785>Funny</a> ........ <a class=product_name
I have a static Html Table which contains one button Add and when clicking
all. I have an huge html file which contains tags like these: <h3 class=r>
I have thousands of html pages which contains below table content ~ <table height=94
My situation is this: I have an html page which contains a table of
I have an html page called search.html which contains sliders, they work perfectly in
I have a HTML fragment which contains two anchor tags in various parts of

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.