Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <body>
  <ul class="links">
    <li><a href="https://github.com/TalkativeTree/AnimatedLogos/tree/master/AnimatedThoughtBotLogo" >Github</a></li>
    <!-- <li><a href="personal_site">My personal_site</a></li> -->
  </ul>

  <section class="murderous-robot">
    <section class="buttons">
      <div class="btn btn-broadcast"><p>broadcast</p></div>
      <div class="btn btn-wave"><p>wave</p></div>
      <div class="btn btn-chase"><p>dance</p></div>

    </section>
    <div class="robot">
      <div class="background-circle"></div>
    <!-- layer 0 has the thought waves coming from the head -->
      <section class="layer waves">
        <div class="little radio-wave"></div>
        <div class="medium radio-wave"></div>
        <div class="big radio-wave"></div>
        <div class="left-triangle"></div>
        <div class="right-triangle"></div>
      </section>

      <!-- layer 1 should have the head, shoulders, and torso -->
      <section class="layer body">
        <div class="head"></div>
        <div class="shoulders"></div>
        <div class="torso"></div>
      </section>

      <!-- layer 2 should have all the moving parts: eyes, legs, arms -->
      <section class="layer">
        <div class="eyes">
          <div class="eye left-eye"></div>
          <div class="eye right-eye"></div>
        </div>
        <div class="right-leg leg-bone rotate-right">
          <div class="foot-border"></div>
          <div class="foot"></div>
          <div class="leg-border"></div>
          <div class="leg"></div>
          <div class="hip-joint"></div>
        </div>
        <div class="left-leg leg-bone rotate-left">
          <div class="foot-border"></div>
          <div class="foot"></div>
          <div class="leg-border"></div>
          <div class="leg"></div>
          <div class="hip-joint"></div>
        </div>
        <div class="left-arm arm">
            <div class="hand-border"></div>
            <div class="hand"></div>
            <div class="forearm"></div>
            <div class="joint"></div>
        </div>
        <div class="right-arm arm">
            <div class="hand-border"></div>
            <div class="hand"></div>
            <div class="forearm"></div>
            <div class="joint"></div>
        </div>
      </section>
    </div>
    <div class="robot-message hide">01101000 01110100 01110100 01110000 01110011 00111010 00101111 00101111 01111001 01101111 01110101 01110100 01110101 00101110 01100010 01100101 00101111 00111000 01010010 00110011 01100100 01011010 00110000 00110001 01010000 01111000 01011111 00111000 00111111 01110100 00111101 00110100 </div>
  </section>
</body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

              
            
!

CSS

              
                body {
  margin: 0;
  padding: 0;
  background-color: #f8f9fb;
}
a {
  text-decoration: none;
}
.links{
  position: relative;
  width: 100px;
  left: calc(50% - 50px);
  text-align: center;
  font-family: futura;
  list-style: none;
  font-size: 20px;
  margin-bottom: 0;
  padding: 0;
}
.murderous-robot{
  height: 25%;
  width: 100%;
  min-height: 500px;
}
.robot-message{
  position: absolute;
  left: calc(32% - 32px);
  top: 50px;
  font-family: futura;
  width: 640px;
  font-weight: bold;
}

/*
==============================================
Utility Classes
==============================================
*/
.hide{
  visibility: hidden;
}
.show{
  visibility: visible !important;
}
.loop_infinitely{
  animation-iteration-count: infinite;
  -webkit-animation-iteration-count: infinite;
}
.rotate_right{
  -webkit-transform-origin: top right;
     -moz-transform-origin: top right;
      -ms-transform-origin: top right;
       -o-transform-origin: top right;
          transform-origin: top right;
}
.rotate_left{
  -webkit-transform-origin: top right;
     -moz-transform-origin: top right;
      -ms-transform-origin: top right;
       -o-transform-origin: top right;
          transform-origin: top right;

}


/*
==============================================
buttons
==============================================
*/
.buttons{
  position: relative;
  top: 2em;
  left: calc(50% - 200px);
  margin-top: 20px;
  height: 50px;
  width: 375px;
  padding: 25px 0 25px 25px
}
.btn{
  float: left;
  height: 40px;
  width: 100px;
  background-color: #AD141E;
  margin: 10px 25px 20px 0;
}

.btn p{
  pointer-events: none;
  cursor: default;
  font-family: futura;
  position: relative;
  text-align: center;
  top: 50%;
  -webkit-transform: translateY(-50%);
      -ms-transform: translateY(-50%);
          transform: translateY(-50%);
  width: 100px;
  margin: 0;
  font-size: 110%;
  color: white;
}

/*
==============================================
robot
==============================================
*/
.robot{
  position: relative;
  top: 4em;
  left: calc(50% - 125px);
  height: 250px;
  width: 250px;
}
.background-circle{
  position: absolute;
  top: 0;
  left: 0;
  background-color: #c32f34;
  height: 250px;
  width: 250px;
  -webkit-border-radius: 250px;
     -moz-border-radius: 250px;
          border-radius: 250px;
}
.layer{
  position: absolute;
  top: 0;
  left: 0;
}

/*
==============================================
Layer 0
==============================================
*/
.radio-wave{
  position: absolute;
  background-color: transparent;
  border-top: 6px solid white;
  border-right: 6px solid transparent;
  border-left: 6px solid transparent;

  animation-duration: 3s;
  -webkit-animation-duration: 3s;

  animation-iteration-count: infinite;
  -webkit-animation-iteration-count: infinite;
}
.little{
  top: 42px;
  left: 94px;
  height: 50px;
  width: 50px;
  border-radius: 50px;
  -webkit-animation-delay: 0.75s;
  animation-delay: 0.75s;
}
.medium{
  top: 32px;
  left: 84px;
  height: 70px;
  width: 70px;
  border-radius: 70px;
  -webkit-animation-delay: 0.5s;
  animation-delay: 0.5s;
}
.big{
  top: 22px;
  left: 74px;
  height: 90px;
  width: 90px;
  border-radius: 90px;
  -webkit-animation-delay: 0.25s;
  animation-delay: 0.25s;
}
.left-triangle{
  position: absolute;
  top: 24px;
  left: 85px;
  border-bottom: 140px solid #c32f34;
  /*border-bottom: 140px solid red;*/
  border-right: 100px solid transparent;
}
.right-triangle{
  position: absolute;
  top: 24px;
  left: 65px;
  border-bottom: 140px solid #c32f34;
  /*border-bottom: 140px solid yellow;*/
  border-left: 100px solid transparent;
}


/*
==============================================
Layer 1
==============================================
*/

.head{
  position: absolute;
  top: 62px;
  left: 94px; /*94 + 30 = 122 */
  height: 42px;
  width: 60px;
  background-color: white;
  border-radius: 3px;
}
.shoulders{
  position: absolute;
  top: 109px;
  left: 67px; /*67 + 55 = 122 */
  height: 24px;
  width: 110px;
  background-color: white;
  border-radius: 3px;

}
.torso{
  position: absolute;
  top: 133px;
  left: 90px;
  height: 52px;
  width: 65px;
  background-color: white;
  /*border-radius-bottom-left: 4px;*/
  border-bottom-left-radius: 4px;
}

/*
==============================================
Layer 2
==============================================
*/

.eye{
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 8px;
  background-color: transparent;
  border: 3px solid #c32f34;
}
.left-eye{
  top: 73px;
  left: 104px;
}
.right-eye{
  top: 73px;
  left: 130px;
}
.arm{
  position: absolute;
  z-index: 12;
  top:   61px;
  height:64px;
  width:  3px;
}
.left-arm{
  left: 70px;
   -webkit-transform: rotate(-180deg);
      -moz-transform: rotate(-180deg);
       -ms-transform: rotate(-180deg);
        -o-transform: rotate(-180deg);
           transform: rotate(-180deg);
   -webkit-transform-origin: bottom right;
      -moz-transform-origin: bottom right;
       -ms-transform-origin: bottom right;
        -o-transform-origin: bottom right;
           transform-origin: bottom right;
}
.right-arm{
  left: 169px;
   -webkit-transform: rotate(-180deg);
      -moz-transform: rotate(-180deg);
       -ms-transform: rotate(-180deg);
        -o-transform: rotate(-180deg);
           transform: rotate(-180deg);
   -webkit-transform-origin: bottom left;
      -moz-transform-origin: bottom left;
       -ms-transform-origin: bottom left;
        -o-transform-origin: bottom left;
           transform-origin: bottom left;

}
.hand-border {
   position:absolute;
    top:-1px;
    left:-12px;
    width: 13px;
   height: 13px;
   background: transparent;
   -moz-border-radius: 14px;
   -webkit-border-radius: 14px;
   border-radius: 14px;
    border-top: 6px solid transparent;
    border-right: 6px solid #c32f34;
    border-left: 6px solid #c32f34;
    border-bottom: 6px solid #c32f34;
}
.hand{
   position:absolute;
    top:0px;
    left:-11px;
    width: 15px;
   height: 15px;
   background: transparent;
   -moz-border-radius: 15px;
   -webkit-border-radius: 15px;
   border-radius: 15px;
    border-top: 4px solid transparent;
    border-right: 4px solid white;
    border-left: 4px solid white;
    border-bottom: 4px solid white;
}

.forearm{
  position: absolute;
  left: -9px;
  top: 19px;
  background-color: white;
  height: 37px;
  width: 17px;
  border-left: 1px solid #c32f34;
  border-right: 1px solid #c32f34;
}
.joint{
  position: absolute;
  left: -8px;
  top: 55px;
  background-color: white;
  height: 12px;
  width: 17px;
  border-bottom-right-radius: 17px;
  border-bottom-left-radius:  17px;
}

.leg-bone{
  position: absolute;
  top:175px;
  height: 42px;
  width: 28px;
  width: 2px;
  background-color: white;
}
.left-leg{
  left: 103px;
   -webkit-transform: rotate(0deg);
      -moz-transform: rotate(0deg);
       -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
           transform: rotate(0deg);

  -webkit-transform-origin: top right;
     -moz-transform-origin: top right;
      -ms-transform-origin: top right;
       -o-transform-origin: top right;
          transform-origin: top right;
}
.right-leg{
  left: 140px;
   -webkit-transform: rotate(0deg);
      -moz-transform: rotate(0deg);
       -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
           transform: rotate(0deg);

  -webkit-transform-origin: top left;
     -moz-transform-origin: top left;
      -ms-transform-origin: top left;
       -o-transform-origin: top left;
          transform-origin: top left;

}
.hip-joint{
  position: absolute;
  left: -13px;
  top: -15px;
  background-color: white;
  height: 30px;
  width: 28px;
  border-top-right-radius: 24px;
  border-top-left-radius: 24px;
}
.leg{
  position: absolute;
  top: 10px;
  left: -13px;
  height: 24px;
  width: 28px;
  background-color: white;
}
.leg-border{
  position: absolute;
  top: 10px;
  left: -14px;
  height: 24px;
  width: 30px;
  background: #c32f34;
}
.foot-border{
  position: absolute;
  bottom: -1px;
  left: -17px;
  height: 8px;
  width: 36px;
  background: #c32f34;
}
.foot{
  position: absolute;
  bottom: -1px;
  left: -17px;
  height: 6px;
  width: 34px;
  background-color: white;
  border-left: 1px solid #c32f34;
  border-bottom: 1px solid #c32f34;
  border-right: 1px solid #c32f34;
}
.foot:before{
  content: '';
  position: absolute;
  top: -3px;
  left: -1px;
  width: 30px;
  border-bottom: 2px solid #c32f34;
  border-right: 3px solid transparent;
  border-left: 3px solid transparent;
}
.foot:after{
  content: '';
  position: absolute;
  top: -2px;
  left: 0px;
  width: 28px;
  border-bottom: 2px solid white;
  border-right: 3px solid transparent;
  border-left: 3px solid transparent;
}

/*
==============================================
broadcast
==============================================
*/


.broadcast{
  animation-name: broadcast;
  -webkit-animation-name: broadcast;

  animation-duration: 1.7s;
  -webkit-animation-duration: 1.7s;

  animation-timing-function: ease-in-out;
  -webkit-animation-timing-function: ease-in-out;
}

@keyframes broadcast {
  0% {
    -webkit-transform: scale(0);
    opacity: 1;
  }
  70% {
    opacity: 1;    
  }
  80% {
    opacity: 0.7;
  }
  100% {
    -webkit-transform: scale(1);
    opacity: 0.1;
  }
}

@-webkit-keyframes broadcast {
  0% {
    -webkit-transform: scale(0);
    opacity: 1;
  }
  70% {
    opacity: 1;    
  }
  80% {
    opacity: 0.7;
  }
  100% {
    -webkit-transform: scale(1);
    opacity: 0.1;
  }
}

/*
==============================================
chase
==============================================
*/

.chase{
  animation-name: chase;
  -webkit-animation-name: chase;

  animation-iteration-count: infinite;
  -webkit-animation-iteration-count: infinite;
  animation-duration: 1.5s;
  -webkit-animation-duration: 1.5s;

  animation-timing-function: ease-in;
  -webkit-animation-timing-function: ease-in;

}
@keyframes chase {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  30% {
    -webkit-transform: rotate(-100deg);
    -moz-transform: rotate(-100deg);
    -o-transform: rotate(-100deg);
    -ms-transform: rotate(-100deg);
    transform: rotate(-100deg);
  }
  60% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}

@-webkit-keyframes chase {
  0% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  30% {
    -webkit-transform: rotate(-100deg);
    -moz-transform: rotate(-100deg);
    -o-transform: rotate(-100deg);
    -ms-transform: rotate(-100deg);
    transform: rotate(-100deg);
  }
  60% {
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transform: rotate(0deg);
  }
}
/*
==============================================
wave
==============================================
*/

.wave{
  animation-name: wave;
  -webkit-animation-name: wave;

  animation-duration: 3s;
  -webkit-animation-duration: 3s;

  animation-timing-function: ease-in;
  -webkit-animation-timing-function: ease-in;

}
@keyframes wave {
  0% {
    -webkit-transform: rotate(-180deg);
    -moz-transform: rotate(-180deg);
    -o-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg)
  }
  30% {
    -webkit-transform: rotate(40deg);
    -moz-transform: rotate(40deg);
    -o-transform: rotate(40deg);
    -ms-transform: rotate(40deg);
    transform: rotate(40deg)
  }
  50% {
    -webkit-transform: rotate(-40deg);
    -moz-transform: rotate(-40deg);
    -o-transform: rotate(-40deg);
    -ms-transform: rotate(-40deg);
    transform: rotate(-40deg)
  }
  70% {
    -webkit-transform: rotate(40deg);
    -moz-transform: rotate(40deg);
    -o-transform: rotate(40deg);
    -ms-transform: rotate(40deg);
    transform: rotate(40deg)
  }
  100% {
    -webkit-transform: rotate(-180deg);
    -moz-transform: rotate(-180deg);
    -o-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg)
  }
}
@-webkit-keyframes wave {
  0% {
    -webkit-transform: rotate(-180deg);
    -moz-transform: rotate(-180deg);
    -o-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg)
  }
  30% {
    -webkit-transform: rotate(40deg);
    -moz-transform: rotate(40deg);
    -o-transform: rotate(40deg);
    -ms-transform: rotate(40deg);
    transform: rotate(40deg)
  }
  50% {
    -webkit-transform: rotate(-40deg);
    -moz-transform: rotate(-40deg);
    -o-transform: rotate(-40deg);
    -ms-transform: rotate(-40deg);
    transform: rotate(-40deg)
  }
  70% {
    -webkit-transform: rotate(40deg);
    -moz-transform: rotate(40deg);
    -o-transform: rotate(40deg);
    -ms-transform: rotate(40deg);
    transform: rotate(40deg)
  }
  100% {
    -webkit-transform: rotate(-180deg);
    -moz-transform: rotate(-180deg);
    -o-transform: rotate(-180deg);
    -ms-transform: rotate(-180deg);
    transform: rotate(-180deg)
  }
}
/*
==============================================
shake
==============================================
*/

.shake{
  animation-name: shake;
  -webkit-animation-name: shake;

  animation-iteration-count: infinite;
  -webkit-animation-iteration-count: infinite;
  animation-duration: 1s;
  -webkit-animation-duration: 1s;

  animation-timing-function: ease-in;
  -webkit-animation-timing-function: ease-in;

}
@keyframes shake {
  0% {
    -webkit-transform: rotate(70deg);
    -moz-transform: rotate(70deg);
    -o-transform: rotate(70deg);
    -ms-transform: rotate(70deg);
    transform: rotate(70deg);
  }
  50% {
    -webkit-transform: rotate(60deg);
    -moz-transform: rotate(60deg);
    -o-transform: rotate(60deg);
    -ms-transform: rotate(60deg);
    transform: rotate(60deg);
  }
  100% {
    -webkit-transform: rotate(70deg);
    -moz-transform: rotate(70deg);
    -o-transform: rotate(70deg);
    -ms-transform: rotate(70deg);
    transform: rotate(70deg);
  }
}
@-webkit-keyframes shake {
  0% {
    -webkit-transform: rotate(70deg);
    -moz-transform: rotate(70deg);
    -o-transform: rotate(70deg);
    -ms-transform: rotate(70deg);
    transform: rotate(70deg);
  }
  50% {
    -webkit-transform: rotate(60deg);
    -moz-transform: rotate(60deg);
    -o-transform: rotate(60deg);
    -ms-transform: rotate(60deg);
    transform: rotate(60deg);
  }
  100% {
    -webkit-transform: rotate(70deg);
    -moz-transform: rotate(70deg);
    -o-transform: rotate(70deg);
    -ms-transform: rotate(70deg);
    transform: rotate(70deg);
  }
}

.slideExpandUp{
	animation-name: slideExpandUp;
	-webkit-animation-name: slideExpandUp;	

	animation-duration: 1.6s;	
	-webkit-animation-duration: 1.6s;

	animation-timing-function: ease-out;	
	-webkit-animation-timing-function: ease -out;

	visibility: visible !important;	
}

@keyframes slideExpandUp {
	0% {
		transform: translateY(100%) scaleX(0.5);
	}
	30%{
		transform: translateY(-8%) scaleX(0.5);
	}	
	40%{
		transform: translateY(2%) scaleX(0.5);
	}
	50%{
		transform: translateY(0%) scaleX(1.1);
	}
	60%{
		transform: translateY(0%) scaleX(0.9);		
	}
	70% {
		transform: translateY(0%) scaleX(1.05);
	}			
	80%{
		transform: translateY(0%) scaleX(0.95);		
	}
	90% {
		transform: translateY(0%) scaleX(1.02);
	}	
	100%{
		transform: translateY(0%) scaleX(1);		
	}
}

@-webkit-keyframes slideExpandUp {
	0% {
		-webkit-transform: translateY(100%) scaleX(0.5);
	}
	30%{
		-webkit-transform: translateY(-8%) scaleX(0.5);
	}	
	40%{
		-webkit-transform: translateY(2%) scaleX(0.5);
	}
	50%{
		-webkit-transform: translateY(0%) scaleX(1.1);
	}
	60%{
		-webkit-transform: translateY(0%) scaleX(0.9);		
	}
	70% {
		-webkit-transform: translateY(0%) scaleX(1.05);
	}			
	80%{
		-webkit-transform: translateY(0%) scaleX(0.95);		
	}
	90% {
		-webkit-transform: translateY(0%) scaleX(1.02);
	}	
	100%{
		-webkit-transform: translateY(0%) scaleX(1);		
	}
}

.pullUp{
	animation-name: pullUp;
	-webkit-animation-name: pullUp;	

	animation-duration: 1.1s;	
	-webkit-animation-duration: 1.1s;

	animation-timing-function: ease-out;	
	-webkit-animation-timing-function: ease-out;	

	transform-origin: 50% 100%;
	-ms-transform-origin: 50% 100%;
	-webkit-transform-origin: 50% 100%; 		
}

@keyframes pullUp {
	0% {
		transform: scaleY(0.1);
	}
	40% {
		transform: scaleY(1.02);
	}
	60% {
		transform: scaleY(0.98);
	}
	80% {
		transform: scaleY(1.01);
	}
	100% {
		transform: scaleY(0.98);
	}				
	80% {
		transform: scaleY(1.01);
	}
	100% {
		transform: scaleY(1);
	}							
}
              
            
!

JS

              
                function Broadcaster(){
  this.broadcasting = false;
  this.wave = $('.radio-wave');
  this.broadcastingWaves = $('.broadcast');
  this.init();
}

Broadcaster.prototype ={
  broadcast: function(animationDelay, broadcastDelay){
    var self = this;
    if (!this.broadcasting){
      console.log('broadcasting');
      self.wave.addClass('broadcast');
      this.broadcasting = true;
      setTimeout(function(){
        self.wave.addClass('show');
      }, animationDelay);
    }else{
      this.broadcasting = false;
      self.wave.removeClass('broadcast');
    }
  },
  rebroadcast: function(animationDelay, broadcastDelay){
    console.log('rebroadcasting');
    var self = this;
    this.reset();
    this.quietBtn();
    setTimeout(function(){
      self.wave.addClass('broadcast');
      setTimeout(function(){
        self.wave.addClass('show');
        self.activateBtn();
      }, animationDelay);
    }, broadcastDelay);
  },
  reset: function(){
    this.wave.removeClass('broadcast');
    this.wave.removeClass('show');
  },
  quietBtn: function(){
    console.log('off');
    $('.btn-broadcast').off('click');
  },
  activateBtn: function(){
    var self = this;
    $('.btn-broadcast').click(function(){
      self.broadcast(750,0);
    });
  },
  init: function(){
    this.activateBtn();
  }
};
function startChasing(){
  $('.radio-wave').addClass('broadcast');
  $('.robot-message').addClass('show broadcast');
  $('.left-leg').addClass('chase');
  $('.right-arm').addClass('shake');
  $('.left-arm').addClass('shake');
  setTimeout(function(){
    $('.right-leg').addClass('chase');
  }, 750);
  $('.buttons').addClass('hide');
}

function wave(){
  $('.right-arm').addClass('wave');
}


function getClass(btn){
  return btn.attr('class').split(' ')[1].split('-')[1];
}

$(function(){
  var broadcaster = new Broadcaster();

  $(window).scroll(function() {
    var topOfWindow = $(window).scrollTop();
    console.log(topOfWindow);
    $('.radio-wave').each(function(){
      var imagePos = $(this).offset().top;

      if (imagePos < topOfWindow+400 && !broadcaster.broadcasting) {
        broadcaster.broadcast(1250,0);
      }
    });
  });
  $('.btn-wave').click(function(){
    $('.right-arm').removeClass('wave');
    setTimeout(function(){wave();}, 500);
  });
  $('.btn-chase').click(function(){startChasing();});
});

              
            
!
999px

Console