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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:54:07+00:00 2026-06-01T08:54:07+00:00

For example, consider this markup: <table> <tr> <td> <div id=d1> <div>222</div> <div>333</div> </div> </td>

  • 0

For example, consider this markup:

<table>
   <tr>
    <td>
      <div id="d1">
         <div>222</div>
         <div>333</div>
      </div>
    </td>
   </tr>
   <tr>
    <td>
      <p>
         <div id="d1_1">
          <div>222</div>
         </div>
      </p>
    </td>
   </tr>
</table>

EDIT: I would like to get only the DIVSs “d1” and “d1_1”

Thanks

  • 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-01T08:54:08+00:00Added an answer on June 1, 2026 at 8:54 am
    $('td').find('div:first')
    

    This says, find the first div in each td.

    Just for fun, this would find those NOT the first one:

    $('td').find('div:not(:first)')
    

    See this (slightly modifed) example: http://jsfiddle.net/ezaHU/

    I modified it to add text to the second examples td so it would show in the example.

    AND just for complete example, if you ONLY have an id on those:

    $('td').find('div[id]')
    

    But I did not think that is what you were aiming for based on the progression of your edits.

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

Sidebar

Related Questions

Consider this example table (assuming SQL Server 2005): create table product_bill_of_materials ( parent_product_id int
Please consider this example: ( working example ) Style declarations: body {background:#333;font:1em Arial, Helvetica,
Consider this example: http://jsfiddle.net/treeface/P8JbW/ HTML : <div id=test> <img src=http://ycombinator.com/images/y18.gif /> </div> CSS :
I have a few common UI-components, which varies only by content. Consider this example:
Consider this example: zh_Hant_HK format = yy'年'M'月'd'日' ah:mm Not sure if you can see
Consider this example: #include <iostream> class myclass { public: void print() { std::cout <<
Consider this example: l = [1, 2, 3, 4, 5] for values in l:
This is a follow-up question to this one . Consider this example: #include <iostream>
Consider this simple example (which displays in red): echo -e \033[31mHello World\033[0m It displays
Consider this classic example used to explain what not to do with forward declarations:

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.