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


Marcus Schumacher
Marcus Schumacher
16,616 Points

Having problem with this simple JQuery testing project

Here is the html:

<!DOCTYPE html>
  <link rel="stylesheet" href="project.css">
  <div id="wrapper">
      <label>What is your name?</label>
      <p><span>This is the comment given to you</span></p>


  <script src="http://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript" src="project.js"></script>

And here is the JS:

//Add a GO Button over the comment

$("p span").hide();


  $("p span").show();


EXPLANATION: I am trying to make a simple little game where user inputs name and eventually I will have it so there is a comment spat out with their name in it. Right now I am trying to make it so the go button is hidden after you press it and the p comment is shown. When you press the go button, it disappears and the p appears FOR ONLY A SPLIT SECOND. Why doesn't this hide and show them permanently?

Thanks for the help! :D