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

bahman sadeghi
bahman sadeghi
4,810 Points

which part have a problem?

which part have a problem? link of problem is here http://teamtreehouse.com/library/build-an-interactive-website/introduction-to-jquery/including-jquery-in-our-project

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

3 Answers

Michael Wiss
Michael Wiss
19,233 Points

I think you'll need to point to jQuery in the src attribute first:

<script type="text/javascript" src=""></script>

I'm assuming you're on this last question of this challenge based on your code. Everything looks good up until the anonymous function portion of your code.

You're missing a variable in your function that refers back to that refers back to the message ID. Double check the part of the video where he mentions calling a function inside of jQuery.

Vivek Marakana
Vivek Marakana
16,412 Points

Hi, there's slight mistake in second line (the line containing "remove()") of your code. You need to pass $(this) to refer to the element that you clicked. So your correct code will look like:

$(".removable").click(function(){$(this).remove()});