diff --git a/assets/javascripts/app.js b/assets/javascripts/app.js index d25c429..62c8615 100644 --- a/assets/javascripts/app.js +++ b/assets/javascripts/app.js @@ -465,6 +465,25 @@ // $('.header-buttom').appendTo($('.dropdowns')); // } function forFreeGo() { + if (document.documentElement.lang === 'zh_tw') { + document.documentElement.lang = 'zh-Hant'; + } + //tab鍵按下 + $(document).on('keydown', function(e) { + if (e.key === "Tab" || e.keyCode === 9) { + $('.header-nav, .dropdowns').css('display', 'block'); + } + }); + + //li被hover + $('li').hover( + function() { + $(this).children('ul').addClass('show'); + }, + function() { + $(this).children('ul').removeClass('show'); + } + ); //刪除空的h1 $('h1').each(function() { if ($(this).text().trim() === '') {