JQuery - 6. Selecting by Class


Does anybody know why it doesn't work?
I wrote:

$(document).ready(function() {
    $("button").click(function() {

but the squares do not vanish.


Hi Dorelian,

You need to replace function there with something else - do you know what?


Since fadeOut() is a jQuery thing, you need to call the jQuery function, or use it's alias:

// or



course, $, sorry for wasting your time, Zystvan...thanks


No worries, helping other people is never a waste of time :slight_smile:


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