0

I have a jsFiddle that I am working with: http://jsfiddle.net/aL7Xe/77/

It all works great, I just need the blue hover to go away when the arrow is clicked, then to come back after you click off of it.

Trying to achieve it with:

$(this).removeClass('a:hover');
3
  • 3
    a:hover isn't a class, and you can't remove the :hover pseudo-class anyway; you need to override it with other styles. Try using :active for this; JavaScript shouldn't be necessary. Commented Jun 21, 2012 at 0:30
  • Also, please read the tag wiki for jsfiddle next time =) Commented Jun 21, 2012 at 0:32
  • thanks minitech. Obviously I'm new to this. I appreciate the input. Commented Jun 21, 2012 at 2:01

2 Answers 2

1

You can get the effect you want by setting a :hover pseudo-class for .menutoggle. Try this:

.menutoggle, .menutoggle:hover {
    background: grey;
    }

Example

Sign up to request clarification or add additional context in comments.

2 Comments

hey, thanks for the answer. It looks perfect on jsfiddle, but when I put it on my site, the jQuery doesn't work. Do you have any suggestions? live preview
I took a look at your page source and it looks like you have what I believe are zero width spaces in your code. After I removed them your page worked for me. I saw the characters at the end lines 33, 50, and 66, as well as the beginning of line 52. I don't know how they got there, but I would recommend using an appropriate text editor to remove them.
1
a:active{
    background:transparent;
}

In your CSS?

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.