Spin.js - Basic Exampe

HTML

<script src="http://fgnass.github.com/spin.js/spin.js"></script>
<script src="http://fgnass.github.io/spin.js/jquery.spin.js"></script>
<div id="spin"></div>
<button id="stop">Stop</button>

CSS

#spin {
    background: silver;
    width: 200px;
    height: 200px;
    position: relative;
}

JavaScript

var el = $('#spin').spin({ color: '#333', shadow: false })

// Stop spinning after 10s
setTimeout(function() { el.spin(false) }, 10000)

// ... or when the stop button is clicked
$('#stop').click(function() {
  el.spin(false)
})