Not working in IE at all. Works in FF but noting in IE 5.5 to 7

$('#resume_education dl:first').addClass('first_entry');

.resume dl.first_entry {padding:10px 0 10px 25px; float:left; border:none}
.resume dl{padding:10px 0 10px 25px; float:left; border-top:1px dotted #CCC}


-----Original Message-----
From: Chris J. Lee [ MSU #14 ] [mailto:chri...@gmail.com] 
Sent: May-24-09 7:00 PM
To: jQuery (English)
Subject: [jQuery] Re: Apply or remove style


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