button#GoBtn Go
.box
View Compiled
.box
  height: 200px
  width: 200px
  background: red
  margin: 50px 50px
View Compiled
function Start() {

    var box = $('.box');
    
    box.velocity({rotateZ:'360deg'}, {duration:1000, loop:true});
    
    $('#GoBtn').click(function() {
        
        box.velocity('stop').velocity({rotateZ:'0deg'}, {duration:1});
            
        setTimeout(function() {
    
            box.velocity({rotateZ:'360deg'}, {duration:1000, loop:true});
            
        }, 1000);
        
    });
}

$(Start);
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/velocity/1.5.1/velocity.min.js