Alright, I've dabbled in JavaScript before, but the most useful thing I've written is a CSS style-switcher. So I'm somewhat new to this. Let's say I have HTML code like this:
<div class="first">
<div id="bar">
Hello world!
</div>
</div>
Not Working:document.getElementsByClassName("first").getElementById("bar")[0];
getElementsByClassNamereturns an array, not a object for further querying