Skip to content

Commit 33c67eb

Browse files
committed
Demos: Update bootstrap to not use jQuery
1 parent 52a1109 commit 33c67eb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

demos/bootstrap.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ modules = modules ? modules.replace( /^\s+|\s+$/g, "" ).split( /\s+/ ) : [];
4949
modules.push( pathParts[ pathParts.length - 2 ] );
5050

5151
require( modules, function() {
52-
$( "html" ).removeClass( "demo-loading" );
52+
var newScript = document.createElement( "script" );
5353

54-
// We wrap the code in an IIFE so that return statements work and we
55-
// dont polute the global scope with variables
56-
$.globalEval( "(function(){ " + $( script ).html() + "})();" );
54+
document.documentElement.className = "";
55+
56+
newScript.text = "( function() { " + script.innerHTML + " } )();";
57+
document.head.appendChild( newScript ).parentNode.removeChild( newScript );
5758
} );
5859

5960
} )();

0 commit comments

Comments
 (0)