Given this HTML:
<div id="flashcard-001" class="flashcard">
<div class="question">What color is the sky?</div>
<div class="answer">blue</div>
<button class="show">Show</button>
<button class="hide">Hide</button>
</div>
This works:
$("div")[1].innerHTML = "What color is an apple?";
$("div")[2].innerHTML = '<span style="font-size:48pt;color:red">red</span>';
And this works (both buttons turn red):
$("body div button").css('background-color', 'red');
So why doesn't this work (first button does not turn red as expected):
$("body div button")[0].css('background-color', 'red');