pace
pace copied to clipboard
start event not triggered
Hi,
I'm having a script.js file with the following code …
$(window).load(function(){
$('body').addClass("page");
Pace.on('start', function() {
alert('start') // not fired
});
Pace.on('done', function() {
alert('done') // fired!
});
});
Pace is properly loaded (the latest version). The "done" event is triggered and the alert fired. However it seems "start" is never fired. I tried with the other events: "hide" and "done" work, the rest doesn't.
Did I miss something here? What do I have to set in order have the start event fire? I want my header and footer to be loaded immediately, and my content-area to be preloaded. Is there a trick to do that? I thought of using the "start" event to show those element immediately!
I have the same problem!
same problem but only on mobile :/