From 96e027e4b14345722cc39589f59ce2ce5e94b991 Mon Sep 17 00:00:00 2001 From: Rafael Xavier de Souza Date: Fri, 12 Jul 2013 13:40:48 -0300 Subject: All: Wrap source files with UMD return exports Ref #9464 Ref gh-1029 --- ui/jquery.ui.menu.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'ui/jquery.ui.menu.js') diff --git a/ui/jquery.ui.menu.js b/ui/jquery.ui.menu.js index 8c9f5a9be..597ed01e7 100644 --- a/ui/jquery.ui.menu.js +++ b/ui/jquery.ui.menu.js @@ -13,9 +13,24 @@ * jquery.ui.widget.js * jquery.ui.position.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" + ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { -$.widget( "ui.menu", { +return $.widget( "ui.menu", { version: "@VERSION", defaultElement: "