pace.js

Exclude elements from being preloaded

本秂侑毒 提交于 2019-12-25 01:42:57
问题 I use http://github.hubspot.com/pace/ on a current project which preloads the entire page. Is it possible to exclude certain elements from preloading? E.g. I want my #header and #banner element to be visible right away, and let pace do its job for the rest of the page. For me the "start" event is not triggered? Pace.on("start", function() { alert('heee'); }); Wheter in the document-ready nor out of the function. Pace.on("done", … triggers just fine. Update: my major problem at the moment is

increase progressbar loading time in pace.js

℡╲_俬逩灬. 提交于 2019-12-08 18:36:29
I am using pace.js plugin, it works fine but I want that the progress bar will show for longer time, mean to increase the loading time, so user will see the loading screen for long time, by default it run fast. I will also look at these options but can't understand where to add the code for increasing the loading time. I try this code, window.paceOptions={ initialRate:0.7, minTime:1750, maxProgressPerFrame:1, ghostTime: 120000 } but it will not working. You can describe options or in data-pace-options attribute for script tag with pace.js Or better - in simple tag script ( plain js ) BEFORE

increase progressbar loading time in pace.js

旧城冷巷雨未停 提交于 2019-12-08 04:02:23
问题 I am using pace.js plugin, it works fine but I want that the progress bar will show for longer time, mean to increase the loading time, so user will see the loading screen for long time, by default it run fast. I will also look at these options but can't understand where to add the code for increasing the loading time. I try this code, window.paceOptions={ initialRate:0.7, minTime:1750, maxProgressPerFrame:1, ghostTime: 120000 } but it will not working. 回答1: You can describe options or in

pace.js “Hide everything but PACE until the page has fully loaded” local copy

余生长醉 提交于 2019-12-03 09:47:32
问题 I was able to hide everything but pace until the page had loaded when installing pace.js with eager.io. However, when using bower to install the plugin and downloading the css theme, I was unable to figure out how to do this. 回答1: I fixed this by adding this css body > :not(.pace),body:before,body:after { -webkit-transition:opacity .4s ease-in-out; -moz-transition:opacity .4s ease-in-out; -o-transition:opacity .4s ease-in-out; -ms-transition:opacity .4s ease-in-out; transition:opacity .4s