I'm trying following code but it's not working. The selectors are all right (In console, both list items are displayed) but opposite to it, the CSS is applied to only first element. Why is it so?
HTML
<ul>
<li class="c1">1</li>
<li class="c2">2</li>
<li>3</li>
</ul>
SCRIPT
$(document).ready(function(){
var a=$(".c1");
var b=$(".c2");
console.log(a, b);
$(b, a).css("font-size", "20px");
});
var a=$(".c1")[0]; var b=$(".c2")[0];