aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.slider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.slider.js')
-rw-r--r--ui/jquery.ui.slider.js21
1 files changed, 18 insertions, 3 deletions
diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js
index 7c67221b3..627352fba 100644
--- a/ui/jquery.ui.slider.js
+++ b/ui/jquery.ui.slider.js
@@ -13,9 +13,24 @@
* jquery.ui.mouse.js
* jquery.ui.widget.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.core",
+ "./jquery.ui.mouse",
+ "./jquery.ui.widget"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
-$.widget( "ui.slider", $.ui.mouse, {
+return $.widget( "ui.slider", $.ui.mouse, {
version: "@VERSION",
widgetEventPrefix: "slide",
@@ -679,4 +694,4 @@ $.widget( "ui.slider", $.ui.mouse, {
}
});
-}(jQuery));
+}));