I am confused regarding the use of ' ' and '.' in a jQuery function. When exactly do you use one or the other?
For example,
var main = function(){
$('.article').click(function(){
$('.article').removeClass('current')
$('.description').hide();
$(this).addClass('current');
$(this).children('.description').show();
}
)};
$(document).ready(main);
Why is it correct to use .addClass('current') and not .addClass('.current'),
or children('.description') instead of children('description')?
Thank you, I couldn't really find the answer or knew how to look for it on Google.