From b5ef06e3a53aca81a4b011a8cbd70614e9231821 Mon Sep 17 00:00:00 2001 From: Lee <342694918@qq.com> Date: Fri, 4 Nov 2022 15:47:05 +0800 Subject: [PATCH] bug --- public/static/web/js/script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/public/static/web/js/script.js b/public/static/web/js/script.js index b042d47..68ed823 100644 --- a/public/static/web/js/script.js +++ b/public/static/web/js/script.js @@ -64,7 +64,7 @@ $(function(){ // 导航切换 $('.index-news-nav>span').eq(0).addClass('active'); $('.new-list>.swiper').eq(0).addClass('show'); - $(document).on('click','.index-news-nav>span',function() { + $('.index-news-nav>span').click(function(){ if(!$(this).hasClass('active')){ $('.index-news-nav>span').eq($(this).index()).addClass("active").siblings().removeClass('active'); $('.new-list>.swiper').eq($(this).index()).addClass("show").siblings().removeClass('show'); @@ -114,7 +114,7 @@ $(function(){ if($('.management-team-list').length){ $('.management-team-nav>span').eq(0).addClass('active'); $('.management-team-list .management-team-item').eq(0).addClass('show'); - $(document).on('click','.management-team-nav>span',function() { + $('.management-team-nav>span').click(function(){ var scrollTop = $(document).scrollTop(); if(!$(this).hasClass('active')){ $(document).scrollTop(scrollTop+1).scrollTop(scrollTop); @@ -126,7 +126,7 @@ $(function(){ // 尾部导航 if(window.innerWidth <= 1024){ - $(document).on('click','.foot-left>.item>a',function() { + $('.foot-left>.item>a').click(function(){ if(!$(this).parent().hasClass('active')){ $('.foot-left>.item').removeClass('active'); $(this).parent().addClass("active"); @@ -242,7 +242,7 @@ $(function(){ // 手机导航按钮 if(window.innerWidth <= 1024){ - $(document).on('click','.head .head-btn',function() { + $('.head .head-btn').click(function(){ if ($('.head .head-btn').attr('class') == 'head-btn cur') { $('.head .head-btn').removeClass('cur'); $('.head .nav').removeClass('active'); @@ -254,7 +254,7 @@ $(function(){ } }); - $(document).on('click','.head .nav-bg',function() { + $('.head .nav-bg').click(function(){ $(this).removeClass('active'); $('.head .head-btn').removeClass('cur'); $('.head .nav').removeClass('active');