diff options
author | Leif Johansson <leifj@sunet.se> | 2012-10-01 11:43:33 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2012-10-01 11:43:33 +0200 |
commit | 054bf580e441e7fc199213eec40769660026b22b (patch) | |
tree | 32698e925fe0b2bffc40ee79bf182ec8959898c0 /src/site-media/js/jquery.spin.js | |
parent | e7d1327eb58d945bc23a613ffa9a2a5b77d4712c (diff) |
updates for django 1.4.1
Diffstat (limited to 'src/site-media/js/jquery.spin.js')
-rw-r--r-- | src/site-media/js/jquery.spin.js | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/site-media/js/jquery.spin.js b/src/site-media/js/jquery.spin.js deleted file mode 100644 index 0a7c2b5..0000000 --- a/src/site-media/js/jquery.spin.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - -You can now create a spinner using any of the variants below: - -$("#el").spin(); // Produces default Spinner using the text color of #el. -$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. -$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). -$("#el").spin({ ... }); // Produces a Spinner using your custom settings. - -$("#el").spin(false); // Kills the spinner. - -*/ -(function($) { - $.fn.spin = function(opts, color) { - var presets = { - "custom": { lines: 7, length: 2, width: 2, radius: 2}, - "tiny": { lines: 8, length: 2, width: 2, radius: 3 }, - "small": { lines: 8, length: 4, width: 3, radius: 5 }, - "large": { lines: 10, length: 8, width: 4, radius: 8 } - }; - if (Spinner) { - return this.each(function() { - var $this = $(this), - data = $this.data(); - - if (data.spinner) { - data.spinner.stop(); - delete data.spinner; - } - if (opts !== false) { - if (typeof opts === "string") { - if (opts in presets) { - opts = presets[opts]; - } else { - opts = {}; - } - if (color) { - opts.color = color; - } - } - data.spinner = new Spinner($.extend({color: $this.css('color')}, opts)).spin(this); - } - }); - } else { - throw "Spinner class not available."; - } - }; -})(jQuery); |