6. Selecting by class


#1

Why is this even passing if it gives me a error message like this.

https://codecademy.com/courses/web-beginner-en-GfjC6/1/2?curriculum_id=50a3fad8c7a770b5fd0007a1#

SyntaxError: expected expression, got '.'

$(document).ready(function() {
    $('.vanish').click(function() {
        $(.fadeOut('slow'))
    });
});

#2

You need the click function to be triggered when you click on button so you need to change it to:

 $('button').click(function() {



here you need to select .vanish and assign .fadeOut to it like so:

        $('.vanish').fadeOut('slow');

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.