Made Gumshoe contingent upon a TOC being present. This prevents a console error on pages without a TOC. (#2124)

This commit is contained in:
Jeckari 2019-04-12 08:42:10 -07:00 committed by Michael Rose
parent 44760c989e
commit cf0c046dd2
2 changed files with 17 additions and 18 deletions

View file

@ -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
$( $(

File diff suppressed because one or more lines are too long