You're misusing the children() method. It will only find *children*
(immediate descendants) of the row (TDs in your case) and filter them
according to the selector given. If you want to dig deeper, use find,
or as you already discovered, chained children().

var_row.find('td:eq(0) input')

On Apr 29, 5:53 am, Andu <andrei.fr...@gmail.com> wrote:
> Hi, maybe I'm missing something, but I think I found a possible bug in
> the jQuery 1.3.2 selectors. If it turns out that I'm wrong, please
> forgive me. If I'm right, I'll post this in the official bug tracker.
> The situation that seems buggy to me is the following. I have a table
> with multiple rows, where the first cell of every row has got an input
> inside it. Now, considering that I have a variable var_row that is a
> reference to a row other than the first one, if I try and select the
> input from the row referenced by var_row using this: var_row.children
> ('td:eq(0) input'), what I actually get is the input from the first
> row. If, however, I do something like var_row.children('td:eq
> (0)').children('input') I get what I expected, the input from the row
> referenced by var_row.
> Once again, if I am wrong, please forgive me for wasting your time and
> explain to me what I'm doing wrong.
> All the best!

Reply via email to