From 7f3192f99faa7baf8e2c8011422f865a8c37cb96 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Sun, 10 Feb 2013 05:21:25 +0400 Subject: [PATCH] moved spinner interface to jquery, back to more uniform style... Signed-off-by: Alex A. Naanou --- ext-lib/jquery.spin.js | 16 ++++++++++++++++ index.html | 6 ++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100755 ext-lib/jquery.spin.js diff --git a/ext-lib/jquery.spin.js b/ext-lib/jquery.spin.js new file mode 100755 index 0000000..2c2c8da --- /dev/null +++ b/ext-lib/jquery.spin.js @@ -0,0 +1,16 @@ +// taken from: http://fgnass.github.com/spin.js/ +$.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; +}; diff --git a/index.html b/index.html index 6f83e5f..9595956 100755 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ +