Created
June 19, 2013 18:04
-
-
Save Abban/5816442 to your computer and use it in GitHub Desktop.
Backbone loading spinner. First go and create and install a spinner on the spin.js website.
This file contains hidden or 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
| #loading{ | |
| position:fixed; | |
| z-index:999; | |
| top:0; | |
| left:0; | |
| width:100%; | |
| height: 100%; | |
| background:rgba(0,0,0,0.3); | |
| } |
This file contains hidden or 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
| <div id="loading"></div> |
This file contains hidden or 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
| $(function(){ | |
| $("#loading").spin({/* YOUR SPINNER OPTIONS */}).hide(); | |
| $('#loading').ajaxStart(function(){ $(this).fadeIn(); }); | |
| $('#loading').ajaxComplete(function(){ $(this).fadeOut(); }); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment