Xenforo callback after page load

  • Thread starter Thread starter Deleted member 125709
  • Start date Start date
D

Deleted member 125709

Guest
Is there any way for a callback to load after the page. Im getting info about a game server and it delays the loading of the entire page, is it possible to load it in after the page is displayed. I tried a few different things but couldnt get it to work.
 
You'd probably want to use JS to trigger an ajax request for the data you want to display.
 
Try triggering async ajax request on DOMContentLoaded event.
For example a simple get request would look like:
Code:
  $(document).on('DOMContentLoaded.loadData', function(evt) {
    $.get('url', function(data) {
      // triggered after data received
    });
  });
 
Back
Top Bottom