This question may seem simple, but I can not find a quality answer. I have an arrow icon and when I click on it, I want it to turn 180 degrees. The code I started using was this:
$('.arrow').click(function() {
$('.rodar').toggleClass('rodado');
});
.rodado{
transform:rotate(180deg);
transition: all 0.3s ease-in-out;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><linkhref="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<i class="material-icons dots green arrow rodar">keyboard_arrow_down</i>
<br>
<i class="material-icons dots green arrow rodar">keyboard_arrow_down</i>
But as you can see in the example, if I click on one, the two run. this
does not work. Can you do it somehow?