Skip to content

Commit 259ee5a

Browse files
committed
js: fix smoothscroll header offset, fix changing URL
1 parent 0e160dc commit 259ee5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

assets/js/_main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ $(document).ready(function () {
8484
});
8585

8686
// init smooth scroll, this needs to be slightly more than then fixed masthead height
87-
$("a").smoothScroll({ offset: -65 });
87+
$("a").smoothScroll({
88+
offset: -75, // needs to match $masthead-height
89+
preventDefault: false,
90+
});
8891

8992
// add lightbox class to all image links
9093
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup");

0 commit comments

Comments
 (0)