HEX
Server: nginx/1.27.1
System: Linux in-4 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64
User: ilikadirect (1186)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v6964/duplicatefoodfactor/public_html/wp-content/plugins/staff-list/js/tabs.js
(function( $ ) {
    'use strict';
    $(function() {
        // Grab the wrapper for the Navigation Tabs abcfsl_tabs.cntrID
        var navTabs1 = $( abcfsl_tabs.cntrID1).children( '.nav-tab-wrapper' ), tabIndex1 = null;
        var navTabs2 = $( abcfsl_tabs.cntrID2).children( '.nav-tab-wrapper' ), tabIndex2 = null;


    navTabs1.children().each(function() {
        $( this ).on( 'click', function( evt ) {

            evt.preventDefault();

            // If this tab is not active...
            if ( ! $( this ).hasClass( 'nav-tab-active' ) ) {

                // Unmark the current tab and mark the new one as active
                $( '.nav-tab-active', abcfsl_tabs.cntrID1 ).removeClass( 'nav-tab-active abcfTabactive' );
                $( this ).addClass( 'nav-tab-active abcfTabactive' );

                // Save the index of the tab that's just been marked as active. It will be 0 - 3.
                tabIndex1 = $( this ).index();

                // Hide the old active content
                $( abcfsl_tabs.cntrID1 )
                        .children( 'div:not( .inside.hidden )' )
                        .addClass( 'hidden' );

                $( abcfsl_tabs.cntrID1 )
                        .children( 'div:nth-child(' + ( tabIndex1 ) + ')' )
                        .addClass( 'hidden' );

                // And display the new content
                $( abcfsl_tabs.cntrID1 )
                        .children( 'div:nth-child( ' + ( tabIndex1 + 2 ) + ')' )
                        .removeClass( 'hidden' );

                $('#sort-items-tbl td').each(function(){
                    $(this).css('width', $(this).width() +'px');
                });
            }
        });
    });

    navTabs2.children().each(function() {
        $( this ).on( 'click', function( evt ) {

            evt.preventDefault();
            if ( ! $( this ).hasClass( 'nav-tab-active' ) ) {
                $( '.nav-tab-active', abcfsl_tabs.cntrID2 ).removeClass( 'nav-tab-active abcfTabactive' );
                $( this ).addClass( 'nav-tab-active abcfTabactive' );
                tabIndex2 = $( this ).index();
                $( abcfsl_tabs.cntrID2 )
                        .children( 'div:not( .inside.hidden )' )
                        .addClass( 'hidden' );

                $( abcfsl_tabs.cntrID2 )
                        .children( 'div:nth-child(' + ( tabIndex2 ) + ')' )
                        .addClass( 'hidden' );

                $( abcfsl_tabs.cntrID2 )
                        .children( 'div:nth-child( ' + ( tabIndex2 + 2 ) + ')' )
                        .removeClass( 'hidden' );

                $('#sort-items-tbl td').each(function(){
                    $(this).css('width', $(this).width() +'px');
                });
            }
        });
    });


	});
})( jQuery );