<div id="box"></div>
#box{
  background-color: red;
  height: 400px;
  width: 400px;
  position: absolute;
}
function sposta() {
  $("#box").velocity({
    left: "500px",
  }, {
    duration: 1000, 
    easing: "easeOutQuad"
  });
}

$("#box").on('click', function(){
  sposta();
});
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://code.jquery.com/jquery-2.2.4.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/velocity/2.0.5/velocity.js