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

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,314 Points

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

2 Answers

Steven Parker
Steven Parker
231,275 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

Hi,

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

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