diff options
-rw-r--r-- | demos/search.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/demos/search.js b/demos/search.js index 448071cc9..c6dddb80e 100644 --- a/demos/search.js +++ b/demos/search.js @@ -1,5 +1,18 @@ -require( [ "jquery", ], function( $ ) { +( function( factory ) { "use strict"; + + if ( typeof define === "function" && define.amd ) { + + // Fetch jQuery as an AMD dependency + require( [ "jquery" ], factory ); + } else { + + // Use the jQuery browser global + factory( jQuery ); + } +} )( function( $ ) { + "use strict"; + var database = { "Great Bittern" : "Botaurus stellaris", "Little Grebe" : "Tachybaptus ruficollis", |