Is there a jQuery selector that return all descendant that are 'first of type'?
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"
This says, find the first div in each td.
Just for fun, this would find those NOT the first one:
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:
But I did not think that is what you were aiming for based on the progression of your edits.