3/10 need a lil help


#1

$(document).ready(function() {
$('div').onClick(function() {
$(this).fadeOut('fast');
});
});

i've seen the hint and don't understand why i am not correct given that i've tried .click() as well


#2

Hi Kevinalexanderduran,

onClick() isn't a function, at least not in Vanilla JS or jQuery. Changing onClick() to click() made it pass me, though. What's the error message you're getting?


#3

Try this one :

$(document).ready(function() {
   $('div').on('click', function() {
       $(this).fadeOut('fast');
    }); 
});