From 20f821cd33b86c88d27168fc0cbb65485873259f Mon Sep 17 00:00:00 2001 From: yin5th Date: Wed, 2 Aug 2023 07:31:15 +0000 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/static/web/js/style.js | 4 +++- view/about/index.html | 2 ++ view/layout.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/static/web/js/style.js b/public/static/web/js/style.js index 7ef5c59..c1a00a8 100644 --- a/public/static/web/js/style.js +++ b/public/static/web/js/style.js @@ -9,8 +9,10 @@ var wow = new WOW({ wow.init(); $(function(){ - $(".listcur a").click(function(){ + $(".listcur.info a").click(function(){ $(this).addClass("on").siblings().removeClass("on"); + var index = $(this).index(); + $(".inner-nav2 a").eq(index).addClass("curr").siblings().removeClass("curr"); }) $(".hamburger").click(function(){ diff --git a/view/about/index.html b/view/about/index.html index a73542d..adb93e4 100755 --- a/view/about/index.html +++ b/view/about/index.html @@ -203,6 +203,8 @@ $(".inner-nav2 a").click(function() { $(this).addClass("curr").siblings().removeClass("curr"); + var index = $(this).index(); + $(".listcur.info a").eq(index).addClass("on").siblings().removeClass("on"); $("html, body").animate({ scrollTop: $($(this).attr("href")).offset().top - 130 + "px" }, 1000); diff --git a/view/layout.html b/view/layout.html index 08269c5..d5d6848 100755 --- a/view/layout.html +++ b/view/layout.html @@ -23,7 +23,7 @@ - +