[jQuery] Re: :last in IE6

2008-12-08 Thread ricardobeat
IE6 doesn't support chained class selectors, so "li.alt.last" is exactly the same as "li.last" to it's CSS parser. In your case, "li.last.alt" it's being read as "li.alt", that's why it's applying to all elements. - ricardo On Dec 8, 6:55 am, Liam Potter <[EMAIL PROTECTED]> wrote: > yep, > > I g

[jQuery] Re: :last in IE6

2008-12-08 Thread Liam Potter
cheers Karl, this should help with my coding, cheers :) Karl Swedberg wrote: On Dec 8, 2008, at 3:55 AM, Liam Potter wrote: yep, I got around it by doing this $(this).removeClass("last"); $(this).removeClass("alt"); $(this).addClass("lastalt"); just a minor thing, but it's usually a good

[jQuery] Re: :last in IE6

2008-12-08 Thread Karl Swedberg
On Dec 8, 2008, at 3:55 AM, Liam Potter wrote: yep, I got around it by doing this $(this).removeClass("last"); $(this).removeClass("alt"); $(this).addClass("lastalt"); just a minor thing, but it's usually a good idea to chain these methods: $(this).removeClass('last alt').addClass('lastalt

[jQuery] Re: :last in IE6

2008-12-08 Thread Liam Potter
yep, I got around it by doing this $(this).removeClass("last"); $(this).removeClass("alt"); $(this).addClass("lastalt"); ricardobeat wrote: Have you tried li.alt.last? :D On Dec 5, 12:59 pm, Liam Potter <[EMAIL PROTECTED]> wrote: yes I know this, defining li.last.alt allows me apply spe

[jQuery] Re: :last in IE6

2008-12-05 Thread ricardobeat
Have you tried li.alt.last? :D On Dec 5, 12:59 pm, Liam Potter <[EMAIL PROTECTED]> wrote: > yes I know this, > > defining li.last.alt allows me apply specific styles to the last li. > The li's have zebra striping, and the last is rounded, so i need to swap > out the image if the alt class is appl

[jQuery] Re: :last in IE6

2008-12-05 Thread Liam Potter
yes I know this, defining li.last.alt allows me apply specific styles to the last li. The li's have zebra striping, and the last is rounded, so i need to swap out the image if the alt class is applied. all new browsers support li.last.alt tlob wrote: the class="last alt" are two classes! .a

[jQuery] Re: :last in IE6

2008-12-05 Thread tlob
the class="last alt" are two classes! .alt {} and .last{} is that ok? On Dec 5, 2:59 pm, Liam Potter <[EMAIL PROTECTED]> wrote: > As it turns out, it's not a jQuery problem at all, the last function > works fine, it came down to an ie6 bug > > if i have class="last alt" (alt for striping) and de

[jQuery] Re: :last in IE6

2008-12-05 Thread Liam Potter
As it turns out, it's not a jQuery problem at all, the last function works fine, it came down to an ie6 bug if i have class="last alt" (alt for striping) and declare css like li.last.alt { blah } ie6 see's the ".alt" in ".last.alt" and applies it to any alt class in the html rather then jus

[jQuery] Re: :last in IE6

2008-12-05 Thread Karl Swedberg
On Dec 5, 2008, at 6:46 AM, Liam Potter wrote: I have a simple function to add a "last" class to the last li tag in a specific ul $(".createNewOrder ul li:last").addClass('last'); problem is in IE6 it selects all the li's and adds the class. Anyone come across this before? I've never s