Combining click() and hover()


#1

https://www.codecademy.com/en/courses/web-beginner-en-JwhI1/0/4?curriculum_id=50a3fad8c7a770b5fd0007a1

I don't understand why my code is not working. The click() portion works fine by itself, but when I try to add in the hover() portion it doesn't work at all. Even the click() portion no longer works.

$(document).ready(function(){
    $('div').click(function(){
        $(this).fadeOut('fast');
    });
    $('div').hover(function)(){
        $(this).addClass('red');
    });
});

#2

you have an extra (
so it would be function(){


#3

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