Skip to content

Commit 6a2556f

Browse files
committed
Merge pull request mar10#72 from beat-no/master
AMD support
2 parents 646fc50 + 57135d6 commit 6a2556f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

jquery.ui-contextmenu.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@
77
*
88
* Copyright (c) 2014, Martin Wendt (http://wwWendt.de). Licensed MIT.
99
*/
10-
;(function($, window, document, undefined) {
10+
11+
(function( factory ) {
12+
"use strict";
13+
if ( typeof define === "function" && define.amd ) {
14+
// AMD. Register as an anonymous module.
15+
define([ "jquery" ], factory );
16+
} else {
17+
// Browser globals
18+
factory( jQuery );
19+
}
20+
}(function( $ ) {
1121
"use strict";
1222
var supportSelectstart = "onselectstart" in document.createElement("div"),
1323
match, uiVersion;
@@ -417,4 +427,4 @@
417427
});
418428
}
419429

420-
}(jQuery, window, document));
430+
}));

0 commit comments

Comments
 (0)