As you can see, I have two different audio files that correspond to id="6.1". Is there a way to use getElementById that calls just the "straight" class of the Id's content? I know you can call options within in Id. I tried "document.getElementById('6.1').options[0].text.play()", but that didn't work. (Obviously, I'm new at this.) Anyone have a hint?
<audio id="6.1" preload='none'>
<source class="straight" src='audio/6.1.mp3' type='audio/mpeg' />
<source class="swing" src='audio/swing/6.1.mp3' type='audio/mpeg' />
</audio>
<button onclick="document.getElementById('6.1').play()">▶</button>