HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/survey.wb-webdesign.com/private_html/tmp/assets/a3276484/loadPjax.js
'use strict';
var switchOuterHTML = function (oldEl, newEl, opt) {
        opt = opt || {};
        // really remove all Events!
        var parent = $(oldEl).parent();
        $(oldEl).off().remove();
        parent.append(newEl);
        this.onSwitch();
    },
    switchInnerHTML = function (oldEl, newEl, opt) {
        opt = opt || {};
        // really remove all Events!
        var parent = $(oldEl).parent();
        $(oldEl).off().html('');
        $(oldEl).html($(newEl).html());
        this.onSwitch();
    },
    singletonPjax = function () {
        window.activePjax = window.activePjax || null;
        
        if (window.activePjax === null) {
            console.ls.log('creating a Pjax instance on the window object');
            window.activePjax = new Pjax({
                elements: ['a.pjax', 'form.pjax'], // default is "a[href], form[action]"
                selectors: [
                    '#pjax-content',
                    '#breadcrumb-container',
                    '#bottomScripts',
                    '#beginScripts'
                ],
                debug: window.debugState.backend,
                forceRedirectOnFail: true,
                reRenderCSS : true,
                scriptloadtimeout: 1500,
            });
        }

        return window.activePjax;
    },
    forceRefreshPjax = function () {
        window.activePjax = null;
        singletonPjax();
    },
    unsetPjax = function (){
        window.activePjax.parseDOMtoUnload();
        $('a.pjax').off('click');
        window.activePjax = null;
    },
    triggerLoadUrl = function(e,data){      
        var currentPjax = singletonPjax();
        currentPjax.loadUrl(data.url, singletonPjax().options);
    },
    reparseDocument = function(){
        var currentPjax = singletonPjax();
        currentPjax.parseDOM(document);
    };

window.singletonPjax = singletonPjax;

$(document).off('pjax:reload');
$(document).off('pjax:create');
$(document).off('pjax:refresh');
$(document).off('pjax:load');
$(document).off('pjax:unload');

$(document).on('pjax:reload', forceRefreshPjax);
$(document).on('pjax:create', singletonPjax);
$(document).on('pjax:refresh', reparseDocument);
$(document).on('pjax:load', triggerLoadUrl);
$(document).on('pjax:unload', unsetPjax);