jQuery: The Write Less, Do More JavaScript Library

 « Return to Thread: Basic Selectors Question

Re: Basic Selectors Question

by Glen Lipka :: Rate this Message:

Reply to Author | View in Thread

I whipped up a demo.
http://www.commadot.com/jquery/selectorNestedTable.php

Does this work for you?

Glen

On Mon, May 12, 2008 at 11:55 PM, PaulF <paulfitzpa@...> wrote:

Hi,

I have what I think is probablt a pretty easy question, but I have
tried numerous selctors without getting the correct id.

I have a form which is dynamically generating form fields and tables
all over the place.  I need to pull an ID of the last table inside of
a particular td.  I have tried:
 $("#mytd table:last").attr("id");  and a few other things none of
which successful.

<td id="mytd">
  <table id="mytable0"></table>
  <table id="mytable1"></table>
  <table id="mytable2"></table>
  <table id="mytable..n"></table>
</td>

Can somone help me out?  Thanks in advance!

 « Return to Thread: Basic Selectors Question

LightInTheBox - Buy quality products at wholesale price