Bensirpent07

animate.js

Feb 5th, 2016
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // JavaScript Document
  2. $(document).ready(function(){
  3.     color = 'red';
  4.     window.setInterval(function(){
  5.         if(color == 'red'){
  6.             $('div#testing').animate({'background-color': 'blue'}, 'fast', 'easeOutQuint');
  7.             color = 'blue';
  8.         }
  9.         else if(color == 'blue'){
  10.             $('div#testing').animate({'background-color': 'red'}, 'fast', 'easeOutQuint'); 
  11.             color = 'red';
  12.         }
  13.         console.log(color);
  14.     }, 5000);
  15. });
Add Comment
Please, Sign In to add comment