[jQuery] Re: question about selectors

2007-08-15 Thread Glen Lipka
Ooops; sorry, i forgot one part. $("table").filter("table:lt(2)").find("tr td:first-child").css("border","3px solid red"); Thanks John, first-child worked perfect. Glen On 8/15/07, Glen Lipka <[EMAIL PROTECTED]> wrote: > > Whipped up a demo > http://www.commadot.com/jquery/selectors/tableCo

[jQuery] Re: question about selectors

2007-08-15 Thread John Resig
Try using :first-child instead of :first as :first will only ever return one element - whereas :first-child returns the first element in the 'row'. --John On 8/15/07, Guapo <[EMAIL PROTECTED]> wrote: > > > > there are three 3*3 tables. how to select the first cell in every row > in the first two

[jQuery] Re: question about selectors

2007-08-15 Thread Glen Lipka
Whipped up a demo http://www.commadot.com/jquery/selectors/tableCount.htm $("table").filter("table:lt(2)").find("td:first").css("border","3px solid red"); Glen On 8/15/07, Guapo <[EMAIL PROTECTED]> wrote: > > > > > there are three 3*3 tables. how to select the first cell in every row > in the

[jQuery] Re: Question about selectors

2007-07-03 Thread Daniel Hollocher
Perfect! Thanks, just the info I needed. Dan On 7/3/07, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote: > > > Dan, > > >I tried $('table#my_id/tr') but that doesn't find anything. > > Try: > > $('table#my_id tr') > > - or - > > $('table#my_id/tbody/tr') > > >Then, I tried $('table#my_id').children(

[jQuery] Re: Question about selectors

2007-07-03 Thread Dan G. Switzer, II
Dan, >I tried $('table#my_id/tr') but that doesn't find anything. Try: $('table#my_id tr') - or - $('table#my_id/tbody/tr') >Then, I tried $('table#my_id').children(). That returns this >mysterious element. This element contains, for its own >children, the children of the original table.