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 trialStu Cowley
26,287 PointsHuh? Including jQuery in our Project Code Challenge: Task 4
Hey guys,
So I'm currently stuck on task 4 of the Including jQuery in our Project Code Challenge
The error that I am consistently getting is Bummer! You need to call 'click()' on '$(".removable")' and enter in an anonymous function. and I am a bit confused about what it means.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$("#message").hide().show("slow");
$(".removable").show().prev().remove;
$(".removeable").click(function() {});
Any tips of advice would be greatly appreciated.
Thanking you in advance
Stu :)
2 Answers
Heather Anderson
12,591 PointsHey,
The question states to write the logic inside the anonymous function. The method you're using (remove) is correct, but as it is a method, it requires these guys: ().... making it the method call of remove();
Try putting that inside the anonymous function as a method that's acting on 'this'. Don't forget to use jQuery to select 'this' using the dollar sign.
Does that help?
Stu Cowley
26,287 PointsHey Heather,
I figured out where I was going wrong. I had spelt removable incorrectly. Thanks for your help!
Stu :)
Stu Cowley
26,287 PointsStu Cowley
26,287 PointsI have included the closing </script> tag, but the edit feature doesn't want to work... again!