aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.autocomplete.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r--ui/jquery.ui.autocomplete.js22
1 files changed, 20 insertions, 2 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js
index e40e703b9..e5545abc0 100644
--- a/ui/jquery.ui.autocomplete.js
+++ b/ui/jquery.ui.autocomplete.js
@@ -14,7 +14,23 @@
* jquery.ui.position.js
* jquery.ui.menu.js
*/
-(function( $, undefined ) {
+(function( factory ) {
+ if ( typeof define === "function" && define.amd ) {
+
+ // AMD. Register as an anonymous module.
+ define([
+ "jquery",
+ "./jquery.ui.core",
+ "./jquery.ui.widget",
+ "./jquery.ui.position",
+ "./jquery.ui.menu"
+ ], factory );
+ } else {
+
+ // Browser globals
+ factory( jQuery );
+ }
+}(function( $ ) {
$.widget( "ui.autocomplete", {
version: "@VERSION",
@@ -602,4 +618,6 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
}
});
-}( jQuery ));
+return $.ui.autocomplete;
+
+}));