update
This commit is contained in:
parent
48c3770079
commit
8577107615
|
|
@ -1755,17 +1755,32 @@ $(function() {
|
|||
var key = getTabKey($currentTab);
|
||||
var $visibleItems = getVisibleItems($scope, key);
|
||||
|
||||
// Shift+Tab:若是第一個連結,跳回對應頁籤
|
||||
// 找出當前類別的 .w-annc__more
|
||||
var $more = $scope.find('.w-annc__more-wrap a, .w-annc__more').filter(':visible').first();
|
||||
|
||||
// Shift+Tab:若在第一個連結,跳回對應頁籤
|
||||
if (e.which === 9 && e.shiftKey) {
|
||||
if ($currentLink.is($visibleItems.find('a').first())) {
|
||||
e.preventDefault();
|
||||
$currentTab.focus();
|
||||
}
|
||||
// Shift+Tab:若在 .w-annc__more,跳回最後一個公告連結
|
||||
if ($more.length && $currentLink.is($more)) {
|
||||
e.preventDefault();
|
||||
$visibleItems.find('a').last().focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Tab:若是最後一個連結,跳到下一個頁籤並切換
|
||||
// Tab:若在最後一個連結,跳到 .w-annc__more
|
||||
if (e.which === 9 && !e.shiftKey) {
|
||||
if ($currentLink.is($visibleItems.find('a').last())) {
|
||||
if ($more.length) {
|
||||
e.preventDefault();
|
||||
$more.focus();
|
||||
}
|
||||
}
|
||||
// Tab:若在 .w-annc__more,才跳到下一個頁籤
|
||||
if ($more.length && $currentLink.is($more)) {
|
||||
var $nextTab = $currentTab.next('.filter_tab');
|
||||
if ($nextTab.length > 0) {
|
||||
e.preventDefault();
|
||||
|
|
|
|||
Loading…
Reference in New Issue