File tree Expand file tree Collapse file tree 3 files changed +1270
-8
lines changed
Expand file tree Collapse file tree 3 files changed +1270
-8
lines changed Original file line number Diff line number Diff line change 154154 * - Removed dependency on metadata plugin in favor of .data()
155155 * - Namespaced all events
156156 */
157- ( function ( $ ) {
157+
158+ // Support for UMD style
159+ // Based on UMDjs (https://github.com/umdjs/umd/blob/master/templates/jqueryPlugin.js)
160+ ( function ( factory ) {
161+ if ( typeof define === 'function' && define . amd ) {
162+ define ( [ 'jquery' ] , factory ) ;
163+ } else if ( typeof module === 'object' && module . exports ) {
164+ module . exports = function ( root , jQuery ) {
165+ if ( jQuery === undefined ) {
166+ if ( typeof window !== 'undefined' ) {
167+ jQuery = require ( 'jquery' ) ;
168+ }
169+ else {
170+ jQuery = require ( 'jquery' ) ( root ) ;
171+ }
172+ }
173+ factory ( jQuery ) ;
174+ return jQuery ;
175+ } ;
176+ } else {
177+ factory ( jQuery ) ;
178+ }
179+ } ( function ( $ ) {
180+
158181 /** jGrowl Wrapper - Establish a base jGrowl Container for compatibility with older releases. **/
159182 $ . jGrowl = function ( m , o ) {
160183 // To maintain compatibility with older version that only supported one instance we'll create the base container.
396419 /** Reference the Defaults Object for compatibility with older versions of jGrowl **/
397420 $ . jGrowl . defaults = $ . fn . jGrowl . prototype . defaults ;
398421
399- } ) ( jQuery ) ;
422+ } ) ) ;
You can’t perform that action at this time.
0 commit comments