Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript One Solution

Hide/show the text inside the #helpText span element when the user's mouse passes over the text "How are these ran

Hello, I made a solution like the teacher notes but it only works when I clicked over the span even when I selected 'mouseover':

$('#helpText').on('mouseover', function(){ $('#helpText span').toggle();

What is wrong?

Adam Beer
Adam Beer
11,313 Points

This is the good code! There may be an error in your html code.

2 Answers

Steven Parker
Steven Parker
216,175 Points

Adam makes a good point, errors aren't always where you expect them. It helps to have the whole code to look at.

You can share the entire project easily by using the "snapshot" function in the workspace and posting the link it gives you.

Oleg Mogytych
Oleg Mogytych
10,684 Points


I upgraded the JS in this way so it appears and hides after mouseleave

$('#helpText').on('mouseover mouseleave', function(){ $('#helpText span').toggle();