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 problem before and I still can't figure out why my code is wrong. Please can someone post the correct code for me. And also, here is my for challenge task 3, as that is where it told me that task 2 wasn't passing:

 $("#message").show("slow");
  $(".removable")

4 Answers

Try this;

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

I tried that and it worked for task 3 but it told me to go to task 2 when I entered the code for task 4. This is my code for task 4:

  $('#message').hide();
  $('#message').show('slow')
  $('.removable').click(function();

Oh, i see...

You're missing a small bit of code in your function.

$('#message').hide(); $('#message').show('slow') $('.removable').click(function() { // Action when clicked });

It's a bit tricky, but have a look at the jQuery docs for more information about this: http://api.jquery.com/click/

Thank you for your help

Why is it that in the video they are calling the id through the use of '.' as in $(".order_form") and in the challenge when I use $(".message") its telling me that I'm not calling id correctly? When I switch the '.' to a '#', I was good to go.

never mind. I missed the part about classes being called with a "." and an id being called with "#".