Hides a DOM element, creates a new one next to it with the original element's dimensions, adds a vertically and horizonally centered css spinner inside the new element.
var spinnerHelper = new SpinnerHelper($('#el'));
Call the destroy method to delete the spinner and unhide the original element.
spinnerHelper.destroy();
Download the dist/spinner_helper.js file and add it to your page.
Or install with bower:
$ bower install spinner_helper
jQuery >= 1.7.2
spin.js