summaryrefslogtreecommitdiff
path: root/public/js/cover.js
diff options
context:
space:
mode:
authorWu Cheng-Han2017-01-16 12:42:21 +0800
committerWu Cheng-Han2017-01-16 12:42:21 +0800
commite00daee6c0dd0c6e5f2654d24995bc9d86fbc452 (patch)
tree0486a32a99845a6a118a96f0fb6490bbef9a4cab /public/js/cover.js
parent3c0667813cb1a3d5a0d730eabc70835b52518dfe (diff)
Update to prevent all empty link change hash
Diffstat (limited to 'public/js/cover.js')
-rw-r--r--public/js/cover.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/public/js/cover.js b/public/js/cover.js
index 52ff5a27..f8ffe9bf 100644
--- a/public/js/cover.js
+++ b/public/js/cover.js
@@ -91,9 +91,12 @@ $(".masthead-nav li").click(function () {
$(this).addClass("active");
});
-$(".ui-home").click(function (e) {
+// prevent empty link change hash
+$('a[href="#"]').click(function (e) {
e.preventDefault();
- e.stopPropagation();
+});
+
+$(".ui-home").click(function (e) {
if (!$("#home").is(':visible')) {
$(".section:visible").hide();
$("#home").fadeIn();
@@ -101,8 +104,6 @@ $(".ui-home").click(function (e) {
});
$(".ui-history").click(function (e) {
- e.preventDefault();
- e.stopPropagation();
if (!$("#history").is(':visible')) {
$(".section:visible").hide();
$("#history").fadeIn();