I have the following DIV:

```
<div class="gallery home"></div>

```

And I have the Query:

```
  if ($('.gallery.home')) {
    console.log('home');
  }

  if ($('.gallery.showcase')) {
    console.log('showcase');
  }

```

The problem is that both `if` return true. Shouldn't only the first one return true?

I then tried using only Javascript the same happens:

```
  if (document.getElementsByClassName('.gallery.home')) {
    console.log('home');
  }

  if (document.getElementsByClassName('.gallery.showcase')) {
    console.log('showcase');
  }

```

How to match an element that has 2 classes?