jQuery functions and selectors #12 "Toggling our panel" passing bad code

(document).ready(function() { (’.pull-me’).click(‘fast’, 0);
$(’.panel’).slideToggle(‘slow’);
});

The program accepted this code. My husband walked by my desk, saw it, and was absolutely flabbergasted that my original answer was labeled correct. This code will not work for the task at hand. The ‘click’ event should have an anonymous function replace the (‘fast’, 0).

For this being a code tutorial website, I am surprised they themselves have written ineffective ‘answer-checking’ code. If you are having similar issues in the tutorial, add them as replies to this post. Maybe if the issues are more consolidated, someone will notice and fix it.

Thanks!

Hi -

Our code tester tends to err on the side of false positives rather than being overly strict, to avoid failing learners when they slightly modified their code from what the instructions asked for. For this reason, sometimes people can pass with failing code like you have.

Sorry about this!

Artur
Engineer, Codecademy

2 Likes