Font Awesome spinners icons not spinning

user4708518

I have tried to add a Font Awesome spinner icons to a page when I click a button using Jquery, however the spinners does not actually spin.

http://codepen.io/Riggster/pen/WvLZxb

<li id="num1">
  <p>1:
    PHP Code for random number here
  </p>
</li>
<li>
  <p>
    <button class="btn btn-sm btn-default" onclick="NewNum()" type="button">Re-roll random numbers</button>
  </p>
</li>

function NewNum() {
  $("#num1").html("<i class='fa fa-refresh'></i>");
}
Jascha Goltermann

adding fa-spin to the class like this will work:

function NewNum() {
  $("#num1").html("<i class='fa fa-refresh fa-spin'></i>");
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related