Skip to content

Commit f2ee897

Browse files
committed
Fix to prevent hash change on click nav item on index
1 parent 5751578 commit f2ee897

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

public/js/cover.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,18 @@ $(".masthead-nav li").click(function () {
9191
$(this).addClass("active");
9292
});
9393

94-
$(".ui-home").click(function () {
94+
$(".ui-home").click(function (e) {
95+
e.preventDefault();
96+
e.stopPropagation();
9597
if (!$("#home").is(':visible')) {
9698
$(".section:visible").hide();
9799
$("#home").fadeIn();
98100
}
99101
});
100102

101-
$(".ui-history").click(function () {
103+
$(".ui-history").click(function (e) {
104+
e.preventDefault();
105+
e.stopPropagation();
102106
if (!$("#history").is(':visible')) {
103107
$(".section:visible").hide();
104108
$("#history").fadeIn();

0 commit comments

Comments
 (0)