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/vtabs.js
(function( $ ) {
    'use strict';
    $(function() {
        // Grab the wrapper for the Navigation Tabs
        var vTabsMgr_1 = $( abcfsl_VTabs.mgr_1).children( '.abcflVTabsNavCntr' ), tabIndex1 = null;
        var vTabsCntCntr_1 = abcfsl_VTabs.cntCntr_1;
        var vTabsMgr_2 = $( abcfsl_VTabs.mgr_2).children( '.abcflVTabsNavCntr' ), tabIndex1 = null;
        var vTabsCntCntr_2 = abcfsl_VTabs.cntCntr_2;

        //console.log(vTabsMgr_1);

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

            evt.preventDefault();

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

                //console.log('hasClass');

                // Unmark the current tab and mark the new one as active
                $( '.abcflVTabsTabActive', abcfsl_VTabs.mgr_1 ).removeClass( 'abcflVTabsTabActive' );
                $( this ).addClass( 'abcflVTabsTabActive' );

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

                //console.log(tabIndex1);

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

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

                 //console.log($( abcfsl_VTabs.mgr_1 ).children());

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

                //$('#sort-items-tbl td').each(function () { $(this).css('width', $(this).width() + 'px'); });
            }
        });
    });
    vTabsMgr_2.children().each(function() {
        $( this ).on( 'click', function( evt ) {

            evt.preventDefault();

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

                // Unmark the current tab and mark the new one as active
                $( '.abcflVTabsTabActive', abcfsl_VTabs.mgr_2 ).removeClass( 'abcflVTabsTabActive' );
                $( this ).addClass( 'abcflVTabsTabActive' );

                // 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
                $( vTabsCntCntr_2 )
                        .children( 'div:not( .inside.hidden )' )
                        .addClass( 'hidden' );

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

                // And display the new content
                $( vTabsCntCntr_2 )
                        .children( 'div:nth-child( ' + ( tabIndex1 + 1 ) + ')' )
                        .removeClass( 'hidden' );
            }
        });
    });

	});
})( jQuery );