1
How do I when the music starts to rotate 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>
What song? Running do you mean rotating? Do you want the solution in PHP or Javascript? And why did you tag Java? It is very difficult to understand what you want, please edit the question, add some code related to your question. Help us to help you.
– Marcus Vinicius
For dear I’m making a music site and I would like to know how to do when the music starts playing, an image start to rotate (rotate) continuously until the music stops? javascript
– matheus
How is the music playing on the page? With HTML5, Flash, Silverlight? Know how to capture the music play/pause events?
– Marcus Vinicius
i am using jplayer plugin that needs jquery and it is already working correctly I just want to implement this function to rotate image continuously until the music stops, forgive me if I am not making things clear, and I am new in the field of javascript pest
– matheus
I added the other solution :)
– Maicon Carraro
Solved your problem?
– Maicon Carraro