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 trialMackewinsson Palencia
Full Stack JavaScript Techdegree Student 14,390 PointsThis code test is not good. The preview is showing the right behavior but it says it's wrong. please help
This code test is not good. The preview is showing the right behavior but it says it's wrong. please help
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<h2>Student List</h2>
<ul class="student-list">
<li>James McAvoy</li>
<li>Alena Holligan</li>
<li>Wade Christensen</li>
<li>Matt Krzyzynski</li>
</ul>
<script
src="jquery-3.2.1.min.js"></script>
<script src="app.js"></script>
</body>
</html>
$('.student-list').on('click', function(event){
$(event.target).hide(event.target);
});
1 Answer
Steven Parker
231,261 PointsThe error message contains a good clue: " Bummer: Within the anonymous function passed to the "on" method call, did you unintentionally supply arguments to the "hide" method call on the jQuery object with an argument of "event.target"? "
So for this challenge the "hide" call should not have an argument. In actual use, it can take either a duration or an options object argument. See the API page on .hide() for more details.
Tommy Gebru
30,164 PointsTommy Gebru
30,164 PointsTry force-reloading your webpage Mackewinnson, your solution works well for me
Actually both solutions work for me