aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.mouse.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.mouse.js')
-rw-r--r--ui/jquery.ui.mouse.js19
1 files changed, 16 insertions, 3 deletions
diff --git a/ui/jquery.ui.mouse.js b/ui/jquery.ui.mouse.js
index ce1ecca72..4f60c28fc 100644
--- a/ui/jquery.ui.mouse.js
+++ b/ui/jquery.ui.mouse.js
@@ -11,14 +11,27 @@
* Depends:
* jquery.ui.widget.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.widget"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
var mouseHandled = false;
$( document ).mouseup( function() {
mouseHandled = false;
});
-$.widget("ui.mouse", {
+return $.widget("ui.mouse", {
version: "@VERSION",
options: {
cancel: "input,textarea,button,select,option",
@@ -174,4 +187,4 @@ $.widget("ui.mouse", {
_mouseCapture: function(/* event */) { return true; }
});
-})(jQuery);
+}));