mirror of
https://github.com/hacks-guide/minimal-mistakes.git
synced 2024-11-27 02:40:32 +00:00
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
@ -74,23 +74,25 @@ $(document).ready(function() {
|
||||
});
|
||||
|
||||
// Gumshoe scroll spy init
|
||||
var spy = new Gumshoe("nav.toc a", {
|
||||
// Active classes
|
||||
navClass: "active", // applied to the nav list item
|
||||
contentClass: "active", // applied to the content
|
||||
if($("nav.toc").length > 0) {
|
||||
var spy = new Gumshoe("nav.toc a", {
|
||||
// Active classes
|
||||
navClass: "active", // applied to the nav list item
|
||||
contentClass: "active", // applied to the content
|
||||
|
||||
// Nested navigation
|
||||
nested: false, // if true, add classes to parents of active link
|
||||
nestedClass: "active", // applied to the parent items
|
||||
// Nested navigation
|
||||
nested: false, // if true, add classes to parents of active link
|
||||
nestedClass: "active", // applied to the parent items
|
||||
|
||||
// Offset & reflow
|
||||
offset: 20, // how far from the top of the page to activate a content area
|
||||
reflow: true, // if true, listen for reflows
|
||||
|
||||
// Event support
|
||||
events: true // if true, emit custom events
|
||||
});
|
||||
// Offset & reflow
|
||||
offset: 20, // how far from the top of the page to activate a content area
|
||||
reflow: true, // if true, listen for reflows
|
||||
|
||||
// Event support
|
||||
events: true // if true, emit custom events
|
||||
});
|
||||
}
|
||||
|
||||
// add lightbox class to all image links
|
||||
$(
|
||||
"a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']"
|
||||
|
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 New Issue
Block a user