Well, first of all there can only be one element with a given id in your
document tree. So you don't really need to deal with the fact the tr is in a
specific table.
Since jQuery uses css selectors to retrieve DOM nodes, when facing a problem
like this one, think of how you would apply a style to that element in a css
stylesheet.

For instance, to get the element of id 'row1' you would create a rule for
'#row1' -- i.e. the element with id (#) 'row1'.

So you take this selector and use the magic of jQuery: $("#row1") and boom,
you have your element as a jQuery object.

If you wished to get all the td elements inside, you could use $("#row1 td")
which translates as "get all td element in the subtree below the element of
id row1".

Hope this helps.

2009/3/13 Raj <rajkishore.upadh...@gmail.com>

>
> Hi All,
>
> I am new to jquery framework, I have a problem related to jquery,
> Please some one help me out.
>
> I have a table and inside a table I have some rows, Table have a
> specific ID and TR also have an ID.
>
> I have to find a TR with specified ID, and all its TD child.
>
> For Eg.
> <table id='table1'>
> <tr id='row1'>
> <td>1</td>
> <td>2</td>
> <td>3</td>
> </tr>
> <tr id='row2'>
> <td>1</td>
> <td>2</td>
> <td>3</td>
> </tr>
> </table>
>
>
> I have to find the TR with ID = row1 in table with ID=table1.
>
> Can any one please let me know the solution.
> Thanks in advance
> Raj
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to