<div id="block">click me</div>
#block{
  	position:absolute;
    left: 20px;
    top: 50%;
    width: 100px;
    height: 100px;
    margin: -50px 0 0;
    background: #0c8;
    line-height: 100px;
    text-align: center;
    color: #fff;
    cursor: pointer;
}
  var x = 0, y = 0;
  block.addEventListener('click', function(){
    var self = this;
  	requestAnimationFrame(function change(){
      self.style.transform = 'translate(' + 
        (x++) + 'px,' + 100 * Math.cos(Math.PI * (y++/180)) + 'px)';
      requestAnimationFrame(change);
    });
  });

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.