diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index 29f31df..a0a18c0 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -2535,7 +2535,35 @@ $(function() { // 延遲 600 毫秒執行,確保動態元件已載入 setTimeout(wrapGoBackTop, 500); }); +$(function() { + /** + * 修正 Logo 連結與無障礙文字 + * 目標:將登入連結改為官網連結,並更新相關替代文字 + */ + function fixLogoLinkToOfficial() { + // 選取目標連結(建議透過 class 鎖定) + var $logoLink = $('a.orbit-bar-logo'); + if ($logoLink.length > 0) { + // 1. 修改超連結位址 (href) 與 標題 (title) + $logoLink.attr({ + 'href': 'https://www.nfu.edu.tw', + 'title': '國立虎尾科技大學(在本視窗開啟)' + }); + + // 2. 修改內部圖片的替代文字 (alt) + $logoLink.find('img').attr('alt', '國立虎尾科技大學'); + + // 3. 移除內部的

標籤 (避免 display:none 的舊文字干擾無障礙檢測) + $logoLink.find('p').remove(); + } + } + + // 建議使用 setTimeout 確保在 DOM 完全加載或動態產生後執行 + setTimeout(function() { + fixLogoLinkToOfficial(); + }, 500); +}); // 執行 member等高計算,目前改用flexbox故mark掉 by ika 20160105 // $(window).load(function() { // if ($('.index-member-3').length && $(window).width() > 992) {