Made Gumshoe contingent upon a TOC being present. This prevents a console error on pages without a TOC. (#2124)
This commit is contained in:
parent
44760c989e
commit
cf0c046dd2
2 changed files with 17 additions and 18 deletions
|
@ -74,6 +74,7 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Gumshoe scroll spy init
|
// Gumshoe scroll spy init
|
||||||
|
if($("nav.toc").length > 0) {
|
||||||
var spy = new Gumshoe("nav.toc a", {
|
var spy = new Gumshoe("nav.toc a", {
|
||||||
// Active classes
|
// Active classes
|
||||||
navClass: "active", // applied to the nav list item
|
navClass: "active", // applied to the nav list item
|
||||||
|
@ -90,6 +91,7 @@ $(document).ready(function() {
|
||||||
// Event support
|
// Event support
|
||||||
events: true // if true, emit custom events
|
events: true // if true, emit custom events
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// add lightbox class to all image links
|
// add lightbox class to all image links
|
||||||
$(
|
$(
|
||||||
|
|
5
assets/js/main.min.js
vendored
5
assets/js/main.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue