-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c4cbd23
commit aff325f
Showing
1 changed file
with
14 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
'use strict;' | ||
"use strict;"; | ||
|
||
// Importing Bootstrap Collapse and ScrollSpy | ||
// Tree-shaking! | ||
import { Collapse, ScrollSpy } from 'bootstrap'; | ||
import { Collapse, ScrollSpy } from "bootstrap"; | ||
|
||
console.log("Modules Loaded"); | ||
|
||
// Enable collapse elements | ||
let collapseElementList:Array<HTMLElement> = [].slice.call(document.querySelectorAll('.collapse')); | ||
let collapseList:Array<Collapse> = collapseElementList.map(function (collapseEl) { | ||
return new Collapse(collapseEl, { | ||
toggle: false | ||
}); | ||
let collapseElementList: Array<HTMLElement> = [].slice.call( | ||
document.querySelectorAll(".collapse") | ||
); | ||
|
||
let collapseList: Array<Collapse> = collapseElementList.map(function ( | ||
collapseEl | ||
) { | ||
return new Collapse(collapseEl, { | ||
toggle: false, | ||
}); | ||
}); | ||
|
||
// Enabling ScrollSpy | ||
let scrollSpyElements:ScrollSpy = new ScrollSpy(document.body, { | ||
target: '#navbarContent' | ||
let scrollSpyElements: ScrollSpy = new ScrollSpy(document.body, { | ||
target: "#navbarContent", | ||
}); |