[jQuery] Re: Assign 'active' to nav element

2008-10-01 Thread yellowboy
Hi Guys, thanks for the help! I ended up using your suggestions and putting this together: $(this).parents('div.menu div.gallery').find('h2').removeAttr('class'); $(this).addClass('active'); It allows me to deselect the other h2 elements upon clicking a different h2. Your sugges

[jQuery] Re: Assign 'active' to nav element

2008-10-01 Thread Bradley Sepos
Just extend Michael's code a bit: $(this).addClass('active').siblings().removeClass('active'); Bradley~ On Oct 1, 3:47 am, yellowboy <[EMAIL PROTECTED]> wrote: > Well I should also say I want it to deselct when another h2 element is > clicked. > > > > Michael Geary-3 wrote: > > > That's no pro

[jQuery] Re: Assign 'active' to nav element

2008-10-01 Thread yellowboy
Well I should also say I want it to deselct when another h2 element is clicked. Michael Geary-3 wrote: > > > That's no problem, we are all newbies at something. > > So you just want the H2 element to get an 'active' class when you click on > it? Then add this inside the click function: > >

[jQuery] Re: Assign 'active' to nav element

2008-10-01 Thread Michael Geary
That's no problem, we are all newbies at something. So you just want the H2 element to get an 'active' class when you click on it? Then add this inside the click function: $(this).addClass('active'); -Mike > From: yellowboy > > Yes, that is why I am seeking some assistance. > > Not sure how

[jQuery] Re: Assign 'active' to nav element

2008-09-30 Thread yellowboy
Yes, that is why I am seeking some assistance. Not sure how to implement it within my current code. I know how to assign the class as active, but how would I go about making it assign an active class to the h2 element when it is selected? Needless to say I'm a bit of a newbie and was just hopin

[jQuery] Re: Assign 'active' to nav element

2008-09-30 Thread Michael Geary
I don't see anything in your code that resembles your description of what you want. I'd expect to find an addClass('active') call in there somewhere. I see a bunch of other code, but nothing like that. Perhaps that is the problem, the code you need simply isn't there? -Mike > From: yellowboy >