PageSourceSearch

https://archaeology.jp/modules/contrib/nadru_tab_widget/js/nadru-tab-widget.js?t=1790243455

js archaeology.jp collected 2026-09-24 09:51:19 UTC 1,624 bytes, 48 lines download raw bytes

1(function ($) {
2  $(document).ready(function () {
3    $('.nadru-tab-widget .nav-tabs span').click(function (e) {
4      e.preventDefault();
5      $(this).closest('.nadru-tab-widget').find('.tabs-content .tab-pane').removeClass('active show');
6      $(this).closest('.nadru-tab-widget').find('.nav-tabs span').removeClass('active');
7      var target = $(this).attr('href');
8      $(target).addClass('active show');
9      $(this).addClass('active');
10    });
11
12    //focus tab
13    const tabFocusConfigs = [
14      {
15        selector: 'ul.list-tab-items a',
16        onFocus: $el => $el.find('.item-data').addClass('tab-item-border'),
17        onBlur: $el => $el.find('.item-data').removeClass('tab-item-border'),
18      },
19      {
20        selector: '.all-link a',
21        onFocus: $el => $el.addClass('tab-all-link-border'),
22        onBlur: $el => $el.removeClass('tab-all-link-border'),
23      },
24      {
25        selector: '.nadru-tab-widget .nadru-tab-widget-scroll ul li',
26        onFocus: $el => $el.addClass('tab-focus-border-radius'),
27        onBlur: $el => $el.removeClass('tab-focus-border-radius'),
28      }
29    ];
30
31    tabFocusConfigs.forEach(({ selector, onFocus, onBlur }) => {
32      $(document).on('focus', selector, function () {
33        if (window.isTabbing) onFocus($(this));
34      });
35
36      $(document).on('blur', selector, function () {
37        onBlur($(this));
38      });
39    });
40
41    $(document).on('keydown', '.nadru-tab-widget .nadru-tab-widget-scroll ul li', function (e) {
42      if (e.key === 'Enter' || e.keyCode === 13) {
43        $(this).find('.nav-link').trigger('click');
44      }
45    });
46
47  });
48})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.