summaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-16 12:04:11 +0800
committerWu Cheng-Han2017-01-16 12:04:11 +0800
commitf2ee8976997906f76fae39a5f5d7f70860f2c8dc (patch)
treebfa00693508272419fc95afcf93bd029cb5c89c0 /public/js
parent5751578275bd505ea613c77ab997a6ee29b1c1ee (diff)
Fix to prevent hash change on click nav item on index
Diffstat (limited to 'public/js')
-rw-r--r--public/js/cover.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/public/js/cover.js b/public/js/cover.js
index 15f3e9c1..7c63e912 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -91,14 +91,18 @@ $(".masthead-nav li").click(function () {
$(this).addClass("active");
});
-$(".ui-home").click(function () {
+$(".ui-home").click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
if (!$("#home").is(':visible')) {
$(".section:visible").hide();
$("#home").fadeIn();
}
});
-$(".ui-history").click(function () {
+$(".ui-history").click(function (e) {
+ e.preventDefault();
+ e.stopPropagation();
if (!$("#history").is(':visible')) {
$(".section:visible").hide();
$("#history").fadeIn();