How to Show Div During Load with Pace.JS How to Show Div During Load with Pace.JS ajax ajax

How to Show Div During Load with Pace.JS


You can achieve your goal with the following:

CSS:

div.paceDiv {   position: absolute;   width: 100%;   height: 100%;   ...   display: none;}

JS:

Pace.on("start", function(){    $("div.paceDiv").show();});Pace.on("done", function(){    $("div.paceDiv").hide();});

Hope it's no too late though!


This is a old post, but i've fixed this just with css

pace-running::after {position: absolute;background-color: #ffffff;opacity: 0.1;top:0;left: 0;right: 0;width: 100%;height: 100%;content: ' ',z-index: 9998;}