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
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
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
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(
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.
5 matches
Mail list logo