I would like to change the url of a tag <audio>
based on z-index of an image such as:
If img z-index = 7 <audio src = img.mp3> </audio>
Images are in a carousel and the top image is always at z-index=7
<div class="wrapper">
<div id="coverflow" style="left: -391.19999999999993px;">
<img src="img/rf_fip.png" style="z-index: 7; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -284.7px;">
<img src="img/rf_culture.png" style="z-index: 8; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -379.59999999999997px;">
<img src="img/rf_info.png" style="z-index: 9; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -474.49999999999994px;">
<img src="img/rf_inter.png" style="z-index: 10; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -569.4px;">
<img src="img/rf_bleu.png" style="z-index: 11; -webkit-transform: matrix(1, -0.2, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
<img src="img/rf_musique.png" style="z-index: 12; -webkit-transform: matrix(1, 0, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
<img src="img/rf_mouv.png" style="z-index: 11; -webkit-transform: matrix(1, 0.2, 0, 1, 0, 0) scale(0.25); left: -664.3px;">
</div>
</div>
I don't know if JS can be used or if Jquery is needed.