Okay
  Public Ticket #2278514
AJAX loading time
Closed

Comments

  • Kiri Stewart started the conversation

    I am using the Bario Wordpress theme. My homepage is set to the AJAX slides page. My question is related to the AJAX loading time when clicking the "View Case Study" button. It appears that the load time is set to 2 seconds no matter what; regardless of the internet connection, number of images, browser, etc., it always takes the content of every portfolio post at least 2 seconds to slide up from the bottom of the screen.
    Where can I go in the theme files to shorten that default loading time?
    Thanks in advance! 

  •  1,801
    Support replied

    Hello Kiri,

    there are some timeouts involved in ajax loading. first is the one from wait for images library and that's variable.

    Then in this part of the code in /js/scripts.js the function AjaxExapnder()

    setTimeout(function(){
    $("#project-page-data").load(myUrl,function(e){

    $('#project-page-holder').waitForImages({
    finished: function() {

    ///Init scripts here
    ClassicSlider();
    Carousel();
    Shortcodes();

    setTimeout(function(){  

    $('#project-page-data').addClass('is-open');
    setTimeout(function(){ 
    $('#project-page-holder, #project-page-data').height($('.project-page').height());
    },( 500 ));

    setTimeout(function(){
    $('#loader-line-box').removeClass('is-open');
    $('#pp-nav').addClass('disabled');
    $('.caption-content').addClass('disabled');
    $('.section .overlay').addClass('disabled');
    $('#header-title-div').addClass('is-active');
    setTimeout(function(){
    $("#project_close").removeClass("hide");
    },( 600 ));
    setTimeout(function(){
    $('html, body').animate({scrollTop : 350},800);
    },( 400 ));
    },( 300 ));

    },( 500 ));
    },
    waitForAll: true
    });


    });

    },( 500 ));


    you are interested in reducing the outer timeout (500 ) , the project page holder, project page data timeout (500) and the project close (600)

    they are designed to give the smooth fade out effect while keeping in sync different sections of the page

    After you make the changes plz hard refresh the page (Ctrl+F5)

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy