$('.x') vs $('x') When do I use period?


#1

It isn't clear to me when I am supposed to use the period when saying its in reference to x class.

    $(this).addClass('current');
    $(this).children(".description").show();

Why does current not need a '.' but description does? Also in the CSS

.current .item {
background: rgba(206,220,206,.9);
}

how come current has a . there?

Thanks!!


#2

Hi Objectcoder62972,

Your first question has been answered lots before, for example:

Second, the a stands for alpha and lets you control the transparency of something :slightly_smiling: