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

Code Challenge: Including JQuery in our Project

I have mentioned this twice before and it still doesn't work. Every time I complete Task 4 it tells me to go back to Task 2 and sometimes it does that with Task 3. Here is my code for Tasks 1-4:

Task 1:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript"></script>

Task 2:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $('#message').hide();
  $('#message').show('slow');
</script>

Task 3:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $('#message').hide();
  $('#message').show('slow');
  $('.removable')
</script>

Task 4:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
  $('#message').hide();
  $('#message').show('slow');
  $('.removable').click(function();{
   });
</script>

Please get back to me quickly

2 Answers

Chase Lee
Chase Lee
29,275 Points
.hide().show('slow');

Ok thank you very much for your help

Chase Lee
Chase Lee
29,275 Points

Take out the semicolon right after the parenthesis here:

$('.removable').click(function(){ });

Also try string the .hide() and the .slow() methods together.

How do I string the hide and slow together?

You need to chain them together like this:

$('#message').hide().show('slow');