Given your table is named #foo:
$(#foo tr:first)  // this selector would select the first row

or this would work as well $('#foo tr:eq(0)');

You could then chain it with a native jquery function, "addClass" to
add the class. Or as well as toggleClass.
The following would result:

$('table#foo tr:first').addClass('items_first_entry); // This should
add the class "items_first_entry";

- @Chrisjlee



On May 24, 5:20 pm, "Dave Maharaj :: WidePixels.com"
<d...@widepixels.com> wrote:
> I have a php for each loop that creates rows of data, each row is using the
> class .items
>
> How can apply a style to the very first .item only or add attach a extension
> to the .item class so it renders .items_first_entry for the first one?
>
> Thanks to all
>
> Dave

Reply via email to