Adds jquery to DOM generator
This commit is contained in:
parent
446e170e54
commit
a506131d1e
1 changed files with 10 additions and 8 deletions
|
@ -63,6 +63,8 @@ public class DOM {
|
||||||
var body = html.getOrCreate ( "body" );
|
var body = html.getOrCreate ( "body" );
|
||||||
body.addChild ( "script" ).withAttribute ( "src" , "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" ).withAttribute ( "integrity" , "sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" ).withAttribute ( "crossorigin" , "anonymous" ).withText ( " " );
|
body.addChild ( "script" ).withAttribute ( "src" , "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" ).withAttribute ( "integrity" , "sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" ).withAttribute ( "crossorigin" , "anonymous" ).withText ( " " );
|
||||||
|
|
||||||
|
body.addChild ( "script" ).withAttribute ( "src" , "https://code.jquery.com/jquery-3.7.0.min.js" ).withAttribute ( "crossorigin", "anonymous" ).withText ( " " );
|
||||||
|
|
||||||
body.addChild ( "script" ).withAttribute ( "type" , "text/javascript" ).withText ( "const popoverTriggerList = document.querySelectorAll('[data-bs-toggle=\"popover\"]')\n" +
|
body.addChild ( "script" ).withAttribute ( "type" , "text/javascript" ).withText ( "const popoverTriggerList = document.querySelectorAll('[data-bs-toggle=\"popover\"]')\n" +
|
||||||
"const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl));" );
|
"const popoverList = [...popoverTriggerList].map(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl));" );
|
||||||
body.addChild ( "style" ).withText ( "\n" +
|
body.addChild ( "style" ).withText ( "\n" +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue