This is simply for keeping code neater. In CSS I can group elements like this:
.element1,
.element2,
.element3,
.element4,
.element5,
.element6 {
font-weight:bold;
}
is there anything similar in jQuery or would I have to set each separately.
$('.element1').css('font-weight', 'bold');
$('.element2').css('font-weight', 'bold');
$('.element3').css('font-weight', 'bold');
etc
I suppose I imagine something like
$('.element1', '.element2', etc).css('font-weight', 'bold);
Even more simple, you can use precisely the same selector in jQuery as you could in CSS:
$('.element1, .element2').css('font-weight', 'bold);