2:6 Wrong?


This is my code:

$(document).ready(function() {
$('button').click(function() {
$('.vanish').fadeTo('slow', 0);

The code works but i get this error:

Oops, try again. It looks like your divs didn't fade away when the button was clicked. Did you call fadeOut() on all divs with the class .vanish?

Is my code wrong or is it CodeCademy messing around again? Please help.


Hi Herman,

Take a close look at your code:

and the error message:



(Click to view answer) : You need to use $('.vanish').fadeOut('slow') instead of your current code