This code is a visual representation of what I'm trying to accomplish...
<style>
.red{background:red}
.blue{background:blue}
</style>
<div id=test>
<button>1</button>
<button>2</button>
</div>
<script>
var firstBtn=document.getElementById("test").firstChild.className;
(firstBtn!="red")?firstBtn="red":firstBtn="blue";
</script>
If you want to see it in action, check out the jsFiddle link: http://jsfiddle.net/hnfeje2q/
While this code may be simple, as a newcomer to JavaScript, I may need some guidance...
Thank you!