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
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
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:
>
>
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
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
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
>
6 matches
Mail list logo