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!
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
Pericles Theodorou
2,569 PointsBuilding A Rails App - Adding Interactivity
When I'm writing the code for the hover event,
$ ->
$('.status').hover (event) ->
console.log("Hover triggered")
I get the heading in the console but I get no actual reaction to the code.
9 Answers

Joshua Raab
Courses Plus Student 664 PointsADD A SEMICOLON AT THE END.
fixed.

Jody Albritton
Courses Plus Student 5,497 PointsThe only thing that bit of code does is it displays "Hover triggered" in the console, when you over over something with a class of "status". If you are seeing this in the console it is working.

Pericles Theodorou
2,569 PointsThanks Jody,
So what is causing the hover event to not actually work?
When I'm hovering over the statuses, edit and delete do not appear

Jody Albritton
Courses Plus Student 5,497 PointsThe relevant code should be
$ ->
$('.status').hover (event) ->
$(this).toggleClass("hover")
If you have the matching CSS it should appear.

Pericles Theodorou
2,569 PointsI do have the matching CSS because if I inspect the element and edit it by adding hover class in in the <div class = "status"> it shows the edit and delete options

Jody Albritton
Courses Plus Student 5,497 PointsHave you downloaded the project files and looked at them?

Pericles Theodorou
2,569 PointsYes and everything is matching.

Jody Albritton
Courses Plus Student 5,497 PointsMaybe Jason or Jim could take a look at this.

Jason Seifer
Treehouse Guest TeacherTry using the mouse enter and mouse leave events separately. I've always found hover to be kind of buggy.