Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. $(document).ready(function() {
  2. runCode();
  3.  
  4. function runCode() {
  5.  
  6. var uri = "your url to github";
  7. var totalCom = 0;
  8. $.getJSON(uri, function(r) {
  9. for (var i = 0; i < r[0].total; i++) {
  10. totalCom = r[0].total;
  11. }
  12. //count numbers from zero
  13. $({countNum:
  14. $('.row-one-first .number').text()}).animate({countNum: totalCom}, {
  15. duration: 5000,
  16. easing:'linear',
  17. step: function() {
  18. // What todo on every count
  19. $('.row-one-first .number').text(Math.floor(this.countNum));
  20. },
  21. complete: function() {
  22. $('.row-one-first .number').text(this.countNum);
  23. }
  24. });
  25. })
  26. }
  27. setInterval (function() {
  28. runCode();
  29. }, 300000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement