[jQuery] Re: Targeting pseudo classes with jQuery

2008-03-07 Thread TheOriginalH
Perfect gentlemen, thank you very much :) On Mar 7, 3:32 am, Hamish Campbell <[EMAIL PROTECTED]> wrote: > Rather than setting CSS attributes directly, use classes. Eg, with > hover: > > $('.someElements').click(function() { >$('.someElements').removeClass('aSelected'); >$(this).addClass(

[jQuery] Re: Targeting pseudo classes with jQuery

2008-03-07 Thread Hamish Campbell
Rather than setting CSS attributes directly, use classes. Eg, with hover: $('.someElements').click(function() { $('.someElements').removeClass('aSelected'); $(this).addClass('aSelected'); } $('.someElements').hover( function(){ $(this).addClass('aHover') }, function() {

[jQuery] Re: Targeting pseudo classes with jQuery

2008-03-07 Thread Richard D. Worth
On Thu, Mar 6, 2008 at 4:57 PM, TheOriginalH <[EMAIL PROTECTED]> wrote: > > I have a menu which is working nicely. When an item is clicked, I'm > using jQuery to change the CSS color to indicate it is current. To > keep things neat, I have also changed the color of all similar items > back to the