-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replacing the gif AJAX spinner with spin.js
Fixes Bug 992822 Change-Id: Ibd1b81ca54dd47ffb01f3ced9ca92ad1ed727483
- Loading branch information
John Postlethwait
committed
May 1, 2012
1 parent
aef2e5a
commit 8396026
Showing
6 changed files
with
41 additions
and
13 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// jQuery add-on for allowing spin.js to act on jQuery elements directly. | ||
|
||
$.fn.spin = function(opts) { | ||
this.each(function() { | ||
var $this = $(this), | ||
data = $this.data(); | ||
|
||
if (data.spinner) { | ||
data.spinner.stop(); | ||
delete data.spinner; | ||
} | ||
if (opts !== false) { | ||
data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this); | ||
} | ||
}); | ||
return this; | ||
}; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Binary file not shown.
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