From 47f6f9dde2fd1616b204c3d7b5e3556aa9cebed0 Mon Sep 17 00:00:00 2001 From: rulingcom Date: Wed, 22 Sep 2021 15:09:30 +0000 Subject: [PATCH] Fix --- assets/javascripts/app.js | 19 ++++++++++++++++++- .../stylesheets/template/widget/sitemenu.scss | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 8ff468f..97acf0b 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -791,6 +791,20 @@ function transdate(){ // }); // });// //選單 $(document).ready(function() { + $('li.active > span.fa-caret-down').addClass('fa-caret-up').removeClass('fa-caret-down'); + window.has_hover = false; + if($(window).outerWidth(true) >= 768){ + window.has_hover = true; + } + $('.sitemenu-item.level-1').hover(function(){ + if(window.has_hover){ + $(this).find(".sitemenu-dropdown-toggle").addClass("fa-caret-up").removeClass('fa-caret-down'); + } + },function(){ + if(window.has_hover){ + $(this).find(".sitemenu-dropdown-toggle").addClass("fa-caret-down").removeClass('fa-caret-up'); + } + }) var title_wrapper = $("
") title_wrapper.append($('.view_count.pull-right,.page-module-title,#main-content .index-title,.i-member-status-title:eq(0),#main-content > * > [class*="-title"]')); $('.row.pagerow').prepend(title_wrapper); @@ -842,7 +856,10 @@ function transdate(){ if ($(window).outerWidth() < 769){ $('.modules-menu-level-1').css('left','') } - + window.has_hover = false; + if($(window).outerWidth(true) >= 768){ + window.has_hover = true; + } }); $(window).load(function(){ diff --git a/assets/stylesheets/template/widget/sitemenu.scss b/assets/stylesheets/template/widget/sitemenu.scss index 762ed01..85f6424 100644 --- a/assets/stylesheets/template/widget/sitemenu.scss +++ b/assets/stylesheets/template/widget/sitemenu.scss @@ -164,6 +164,9 @@ } & ul { display: block; + position: absolute; + left: 100%; + top: 0; } } &:last-child {