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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:39:35+00:00 2026-06-08T23:39:35+00:00

I have a div structure over which generation I have little control, generated by

  • 0

I have a div structure over which generation I have little control, generated by a jQuery function. The structure has 19 first generation children, one second generation child and 3 third generation children. I am not interested in the fourth generation children. Here is the code:

<div id="columntableordersGrid">
<div></div>
<div></div>
....
<div></div>
<div id="30bcef39-6ab1-69f5-81af-bbb9e870bfd4">
    <div>
        <div id="pdfs"><img src="/kabinet/images/32x32/pdf.png"></div>
        <div class="container">
            <div class="filtericon">
                <div class="filterbutton"></div>
            </div>
            <div class="sortasc">
                <div class="sortascbutton"></div>
            </div>
            <div class="sortdesc" >
                <div class="sortdescbutton"></div>
            </div>
        </div>
        <div id="bb29c057-acd8-f1eb-aa13-69d8498ae47e">
            <div class="column-menubutton"></div>
        </div>
    </div>
</div>
</div>

I need to get the id of one of the third generation children of this structure (bb29c057-acd8-f1eb-aa13-69d8498ae47e). Each time the script runs it is generating new ids.

I can get the ids of the first generation children by using:

    var all = $("#columntableordersGrid > div").map(function() {
        return this.id;
    }).get();

I am interested in child 17, therefore all[16] gives me the id of that child, which is:

30bcef39-6ab1-69f5-81af-bbb9e870bfd4 in the code example above.

The second generation div has unfortunately no class or id, as I said, I have no control over its generation. The third child of this div is the one whose id I need.

Help would be highly appreciated.

  • 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-08T23:39:37+00:00Added an answer on June 8, 2026 at 11:39 pm

    If the id you need is always the parent of an element with the class “.column-menubutton” than the below should work using your existing code.

    var parentDivId = all[16];
    var menuParentDivId = $('#' + parentDivId + " .column-menubutton").parent().attr('id');
    

    See DEMO

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

Sidebar

Related Questions

I have a structure like: <div id=holder> <div id=first></div> <div class=box>I'm the first</div> <div
I have a list of div's. This is one div structure: <div class=commentWrap id=@Model.CommentId>
I have this div structure <div class=panel> <div class=north></div> <div class=center></div> </div> The outer
I have a following div structure <div id=wrapper> <div id=header> <div id=storeFinder> /* html
I have a 9-box with a div structure like so: <div class=NBWrapper> <div class=NBTopRow>
I have below structure <div class=mybox> <div id=imageslide> <a href=><img src=url /></a> </div> </div>
I have the following structure: <div class=parent> <div id=child1>Content here</div> <div class=child2>Content here</div> </div>
I have the following structure: <div id=content-header> <h1 id=title>Athletics Calendar</h1> </div> and the following
I have this HTML structure <div class=buttons> <button data-icon=ui-icon-disk class=save>Save1</button> <button data-icon=ui-icon-check class=ok>OK1</button> <button
I have the following structure: <div id=container> <div id=someid1 style=float:right></div> <div id=someid2 style=float:right></div> <div

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.