6. Selecting by class


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


SyntaxError: expected expression, got '.'

$(document).ready(function() {
    $('.vanish').click(function() {


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:



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