2:6 Wrong?


#1

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.


#2

Hi Herman,

Take a close look at your code:

and the error message:

fadeOut()

:wink:

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