diff --git a/demos/search.js b/demos/search.js index 448071cc9f..c6dddb80ef 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",