PageSourceSearch

https://www.actransit.org/modules/custom/gutenberg_adv/js/tabs-frontend.js?v=8.9.7

js actransit.org collected 2026-09-24 09:00:23 UTC 3,041 bytes, 71 lines download raw bytes

1jQuery(document).ready(function ($) {
2    $('.advgb-tabs-wrapper').each(function () {
3        var activeTab = $(this).data('tab-active');
4        var tabPanel = $(this).find('.advgb-tab-panel');
5
6        var tab = $(this).find('li.advgb-tab:not(".advgb-tab-active")');
7        if($(this).prop('id') !== '') {
8            tab = $(this).find('li.advgb-tab:not(".ui-state-active")');
9        }
10        var tabs = $(this).find('.advgb-tab');
11        var bodyHeaders = $(this).find('.advgb-tab-body-header');
12        var bodyContainers = $(this).find('.advgb-tab-body-container');
13        var bgColor = tab.css('background-color');
14        var borderColor = tab.css('border-color');
15        var borderWidth = tab.css('border-width');
16        var borderStyle = tab.css('border-style');
17        var borderRadius = tab.css('border-radius');
18        var textColor = tab.find('a').css('color');
19
20        if($(this).prop('id') !== '') {
21            $( this ).find( ".advgb-tab a:not(.ui-tabs-anchor)" ).unbind( "click" );
22            // Render tabs UI
23            $( this ).tabs( {
24                active: parseInt( activeTab ),
25                activate: function ( e, ui ) {
26                    var newIdx = ui.newTab.index();
27                    bodyHeaders.removeClass( 'header-active' );
28                    bodyHeaders.eq( newIdx ).addClass( 'header-active' );
29                }
30            } );
31        } else {
32
33            $( this ).find( ".advgb-tab a:not(.advgb-tabs-anchor)" ).unbind( "click" );
34
35            tabs.on( 'click', function ( event ) {
36                event.preventDefault();
37                var currentTabActive = $( event.target ).closest( '.advgb-tab' );
38                var href = currentTabActive.find( 'a' ).attr( 'href' );
39
40                tabs.removeClass( 'advgb-tab-active' );
41                currentTabActive.addClass( 'advgb-tab-active' );
42                bodyContainers.find( '.advgb-tab-body' ).hide();
43                bodyContainers.find( '.advgb-tab-body[aria-labelledby="' + href.replace( /^#/, "" ) + '"]' ).show();
44            } );
45
46            tabs.eq( activeTab ).trigger( 'click' ); // Default
47        }
48
49        bodyHeaders.eq(activeTab).addClass('header-active');
50        bodyHeaders.css({
51            backgroundColor: bgColor,
52            color: textColor,
53            borderColor: borderColor,
54            borderWidth: borderWidth,
55            borderStyle: borderStyle,
56            borderRadius: borderRadius
57        })
58    });
59
60    $('.advgb-tab-body-header').click(function () {
61        var bodyContainer = $(this).closest('.advgb-tab-body-container');
62        var bodyWrapper = $(this).closest('.advgb-tab-body-wrapper');
63        var tabsWrapper = $(this).closest('.advgb-tabs-wrapper');
64        var tabsPanel = tabsWrapper.find('.advgb-tabs-panel');
65        var idx = bodyContainer.index();
66
67        bodyWrapper.find('.advgb-tab-body-header').removeClass('header-active');
68        $(this).addClass('header-active');
69        tabsPanel.find('.advgb-tab').eq(idx).find('a').trigger('click');
70    })
71});

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.