aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.spinner.js
diff options
context:
space:
mode:
authorRafael Xavier de Souza <rxaviers@gmail.com>2013-07-12 13:40:48 -0300
committerRafael Xavier de Souza <rxaviers@gmail.com>2014-01-24 18:22:14 -0200
commit96e027e4b14345722cc39589f59ce2ce5e94b991 (patch)
treeca32a2fff151af28597c158198550eca6e5b8f18 /ui/jquery.ui.spinner.js
parent2651f4571e76979d93cf10d50edc452b0311a5f2 (diff)
downloadjquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.tar.gz
jquery-ui-96e027e4b14345722cc39589f59ce2ce5e94b991.zip
All: Wrap source files with UMD return exports
Ref #9464 Ref gh-1029
Diffstat (limited to 'ui/jquery.ui.spinner.js')
-rw-r--r--ui/jquery.ui.spinner.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/ui/jquery.ui.spinner.js b/ui/jquery.ui.spinner.js
index 30b5983a1..5c23f664d 100644
--- a/ui/jquery.ui.spinner.js
+++ b/ui/jquery.ui.spinner.js
@@ -13,7 +13,22 @@
* jquery.ui.widget.js
* jquery.ui.button.js
*/
-(function( $ ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.core",
+ "./jquery.ui.widget",
+ "./jquery.ui.button"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
function spinner_modifier( fn ) {
return function() {
@@ -26,7 +41,7 @@ function spinner_modifier( fn ) {
};
}
-$.widget( "ui.spinner", {
+return $.widget( "ui.spinner", {
version: "@VERSION",
defaultElement: "<input>",
widgetEventPrefix: "spin",
@@ -502,4 +517,4 @@ $.widget( "ui.spinner", {
}
});
-}( jQuery ) );
+}));