Page Will Not Load After Hitting Back Button in Chrome

60 views Asked by At

I'm having an issue only in Chrome - when you go to the site and click the Chrome browser back button from any random page back to any other, the page will not fully load. I just get the preloader loading/spinning.

I'm not all that experienced with JS, but I see that the JS is injecting the styles for the "fade-in" animation on the "page".

THis is the site: https://gotwoway.oiw11.com/index-2.htm

The JS that is being used is:

$window.on('load', function () {

    // Page loader & Page transition
    if (plugins.preloader.length && !isNoviBuilder) {
        pageTransition({
            target:            document.querySelector('.page'),
            delay:             0,
            duration:          500,
            classIn:           'fadeIn',
            classOut:          'fadeOut',
            classActive:       'animated',
            conditions:        function (event, link) {
                return link &&
                    !/(\#|javascript:void\(0\)|callto:|tel:|mailto:|:\/\/)/.test(link) &&
                    !event.currentTarget.hasAttribute('data-lightgallery') &&
                    !event.currentTarget.matches('[target="_blank"]');
            },
            onTransitionStart: function (options) {
                setTimeout(function () {
                    plugins.preloader.removeClass('loaded');
                }, options.duration * .75);
            },
            onReady:           function () {
                plugins.preloader.addClass('loaded');
                windowReady = true;
            }
        });
    }

Any help or point in the right direction would be greatly appreciated!

0

There are 0 answers