XF 2.1 Cant add custom loading page?

Hello,

I have a custom loading page I use on my website and was trying to use it on xenForo aswell to give a seamless look and feel as if you're never leaving the site. When I add my loader to the PAGE_CONTAINER, my CSS to the EXTRA.LESS, and JS to the HELPER_JS_GLOBAL all I get is an infinite loading page, as in the loading page will not disappear even after load. I am not really using an extra page, it's an overlay with a higher z-index. I have my JS below, maybe I have done something wrong? I tried to use [KL] Loading Improved but it caused a lot of errors and I had to install a fresh version of xenForo. Any and all help is highly appreciated, I have posted my current JS for the loader below.

My current JS:
JavaScript:
$(window).load(function(){
        $('#loader-wrapper').fadeOut();
        initSwiper();
        if($('.isotope-filter').length){
            var initValue = $('.isotope-nav').find('.selected a').attr('data-filter');
            $container.isotope({itemSelector: '.isotope-item', filter: initValue,masonry:{gutter:0,columnWidth:'.grid-sizer'}});           
        }
        if($('.isotope').length){
            $container.isotope({itemSelector: '.isotope-item', masonry:{gutter:0,columnWidth:'.grid-sizer'}});           
        }               
    });

Best Regards,
MindlessMining
 
Back
Top Bottom