Created
June 18, 2015 10:43
-
-
Save gladiatorAsh/30a2bd134619c4022201 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Spin = { | |
spinner: {}, | |
startSpin: function (option) { | |
var settings = $.extend({ | |
element: 'formBody' | |
}, option); | |
var target = document.getElementById(settings.element); | |
var spinner = new Spinner().spin(target); | |
this.spinner = spinner; | |
}, | |
stopSpin: function () { | |
if (typeof (this.spinner) != "undefined" && this.spinner !== null && typeof (this.spinner.opts) == "object") { | |
this.spinner.stop(); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Created methods to use spin.js more effectively.