From 9648bd6a42e9b3291d976991379a515b827c8eb6 Mon Sep 17 00:00:00 2001 From: Lars Jung Date: Fri, 14 Sep 2012 09:59:52 +0200 Subject: [PATCH] Adds missing jQuery.spin plugin. --- src/_h5ai/js/lib/jquery.spin-1.2.6.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/_h5ai/js/lib/jquery.spin-1.2.6.js diff --git a/src/_h5ai/js/lib/jquery.spin-1.2.6.js b/src/_h5ai/js/lib/jquery.spin-1.2.6.js new file mode 100644 index 00000000..faa9a8dd --- /dev/null +++ b/src/_h5ai/js/lib/jquery.spin-1.2.6.js @@ -0,0 +1,21 @@ + +(function ($) { + + $.fn.spin = function (options) { + + return this.each(function () { + + var $this = $(this), + data = $this.data(); + + if (data.spinner) { + data.spinner.stop(); + delete data.spinner; + } + + if (options !== false) { + data.spinner = new Spinner($.extend({color: $this.css('color')}, options)).spin(this); + } + }); + }; +}(jQuery));