Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Simple jQuery question!

Alright, I'm trying to use some jQuery code to have 1 of the hover states on this nav list already selected before a click is made. Then when a click on the next hexagon is made it will remove the current selection and insert the new selection.

I have everything working on a jsfiddle however the jsFiddle I got it working on is without the code being on a hoverstate.

Here is the effect I am trying to use - http://jsfiddle.net/7nVaD/4/

Here is the project I am working on that I can't get the code I wrote to work on http://jsfiddle.net/PjK84/69/

All help is appreciated. I don't think this is a very hard question I think I am just having tunnel vision and it hasn't clicked yet


EDIT: I was able to get it working on my own. You guys can view the jsfiddle at http://jsfiddle.net/PjK84/70/

I'm not sure if this is the best way to go about doing this. As I was hoping to have it replace the selected content with the content of the hovered element. Right now it only changes on click, I'm trying to figure out how to make it change when it's hovered on other elements then a click will bind it.

Help is greatly appreciated!

1 Answer

Why note use jQuery mouseover()?