This commit is contained in:
parent
238699ec30
commit
6c4e0407c5
|
|
@ -2,6 +2,36 @@
|
||||||
// ECMAScript 5 嚴格模式
|
// ECMAScript 5 嚴格模式
|
||||||
'use strict';
|
'use strict';
|
||||||
$(function() {
|
$(function() {
|
||||||
|
var $signLanguageBox = $('.orbit-bar-search-sign-language');
|
||||||
|
var $headerNav = $('.header-nav');
|
||||||
|
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
|
||||||
|
|
||||||
|
// 移除 color: inherit !important
|
||||||
|
$target.each(function() {
|
||||||
|
$(this)[0].style.removeProperty('color');
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleNavMove() {
|
||||||
|
var windowWidth = window.innerWidth;
|
||||||
|
|
||||||
|
if (windowWidth > 768) {
|
||||||
|
if ($signLanguageBox.length && $signLanguageBox.find('[accesskey="U"], [accesskey="W"]').length === 0) {
|
||||||
|
$signLanguageBox.prepend($target);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ($headerNav.length && $headerNav.find('[accesskey="U"], [accesskey="W"]').length === 0) {
|
||||||
|
$headerNav.append($target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
handleNavMove();
|
||||||
|
|
||||||
|
$(window).on('resize', function() {
|
||||||
|
handleNavMove();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
$(function() {
|
||||||
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
|
var $target = $('.header-nav [accesskey="U"], .header-nav [accesskey="W"]');
|
||||||
|
|
||||||
// 移除 color: inherit !important
|
// 移除 color: inherit !important
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue