How do I play a song when I start playing an image? javascript
or php
<script type="text/javascript">
rodarImagem(
function adicionaClassERoda() {
document.getElementById('pic').className = 'rodar';
});
</script>
<style>
.rodar {
animation: rotation 2s infinite linear;
}
@keyframes rotation {
from {-webkit-transform: rotate(0deg);}
to {-webkit-transform: rotate(359deg);}
}
</style>
<div class="jp-controls">
<img id="pic" src="img/cd1.jpg" style="width:100px; height:100px; position:absolute;"> <a href="#"><div class="jp-play" onclick="rodarImagem();" role="button" tabindex="0"><i class="fa fa-play-circle"></i></div></a>
<div class="jp-previous" role="button" tabindex="0"><i class="fa fa-chevron-left"></i>
</div>
<div class="jp-stop" onclick="pararImagem();" role="button" tabindex="0"><i class="fa fa-stop"></i>
</div>
<div class="jp-next" role="button" tabindex="0"><i class="fa fa-chevron-right"></i>
</div>
</div>