#nav.js
This selects an element whose id
is set to "nav"
and has a class
containing "js"
.
For example, it would select any of the following elements:
<figure id="nav" class="js"></figure>
<figure id="nav" class="foo js"></figure>
<figure id="nav" class="js bar"></figure>
<figure id="nav" class="foo js bar"></figure>
But it wouldn't select any of these elements:
<figure></figure>
<figure id="nav"></figure>
<figure class="js"></figure>
<figure id="nav" class="foo bar"></figure>
display: none
This as I'm sure you're already aware sets the element to not display at all on the page.
#nav.js { display: none; }
This combines the above. It selects any element with an id
of "nav"
and a class
containing "js"
and sets it to not display on the page.