I just want to know if instead of
$(".element1").css('background','#000');
$(".element2").css('background','#000');
It is possible to concatinate multiple elements to have them affected by one command or if there is a more efficient way like so:
$(".element1",".element2").css('background','#000');
CSS selectors have always supported unions:
You can also add to the jQuery element set yourself:
All you needed was a cursory glance at the documentation.