Hi I'm trying to make a script, I'm new to jQuery and still learning. 

But I wanted to ask how to make this code work, 

```
$(document).ready(function() {

  if($(".divs").hasClass('extra'))
    {
        $(".close-divs-button").css('display', 'none');
      }
      else
      {
        $(".close-divs-button").css('display', 'block');
    }

});

```

I have several Divs that when it is clicked, it adds a .extra class to expand that DIV.

I also want the .close-divs-button to only show when atleast 3 or more DIVS has a .EXTRA class in it so the user won't have to toggle the class and remove .extra by clicking them one by one, I wanted to add a button to have that global close function.

Help would be really appreciated.