Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Page progress indicator.
<!DOCTYPE html>
<meta charset="utf-8">
<title>Page progress example</title>
body {
background-color: #fff;
#page_progress {
height: 2px;
position: fixed;
top: 0;
width: 100%;
z-index: 100;
#page_progress #inner_loader {
background-color: #de3928;
display: block;
height: 2px;
width: 0;
<script src=""></script>
$(document).ready(function() {
var scrollPercent;
scrollPercent = (document.documentElement.scrollTop + document.body.scrollTop) / (document.documentElement.scrollHeight - document.documentElement.clientHeight) * 100 + "%";
$("#inner_loader").css({ "width" : scrollPercent });
<div id="page_progress">
<span id="inner_loader"></span>
Gingerbread gummi bears pastry croissant. Gummies brownie dessert. Gingerbread pastry cookie. Cookie chocolate cake tootsie roll marshmallow cheesecake cookie bonbon topping cheesecake. Candy chocolate gingerbread. Cookie icing apple pie chocolate bar pastry gummi bears carrot cake. Jelly applicake chocolate cake gingerbread sesame snaps carrot cake sugar plum. Icing biscuit gummi bears chocolate. Ice cream tiramisu topping croissant sweet roll applicake dessert. Dragée gingerbread chupa chups pie cake carrot cake tiramisu. Sweet roll wafer chocolate bar sweet roll marzipan applicake sesame snaps. Marzipan sesame snaps tiramisu halvah. Tootsie roll pie danish soufflé donut muffin icing chupa chups. Muffin applicake danish liquorice jelly-o.
Donut candy canes liquorice cotton candy dessert liquorice gingerbread jelly beans. Applicake candy canes fruitcake cheesecake. Sesame snaps ice cream sweet. Chocolate bar caramels jelly beans powder donut tart donut jelly. Sweet roll caramels apple pie applicake. Macaroon halvah lemon drops. Chocolate bar fruitcake chocolate bar tiramisu. Gingerbread cotton candy. Muffin cheesecake soufflé carrot cake pie. Ice cream toffee bear claw chupa chups. Tootsie roll marshmallow dragée soufflé. Tiramisu croissant jelly. Jujubes sweet roll liquorice.
Dragée bonbon macaroon icing tootsie roll chocolate. Apple pie soufflé candy canes applicake tart fruitcake dessert jujubes. Pie powder applicake wafer apple pie. Jujubes lollipop jelly-o caramels. Candy canes pie powder jelly liquorice chocolate bar. Halvah icing tootsie roll wafer apple pie tiramisu sweet marzipan. Sugar plum marzipan cake cupcake marzipan jelly donut. Danish sweet powder brownie. Liquorice chocolate cake tart fruitcake icing biscuit. Lemon drops gummies danish ice cream. Sweet roll pudding danish ice cream. Carrot cake donut dragée tootsie roll. Topping candy canes bear claw candy liquorice jujubes marshmallow chocolate bar cookie.
Sweet lollipop biscuit marshmallow bonbon sesame snaps lemon drops sesame snaps chocolate cake. Soufflé icing sugar plum cupcake soufflé gingerbread cupcake. Marzipan soufflé wafer cheesecake. Pastry danish cheesecake candy canes dragée gingerbread marzipan soufflé. Chocolate cake chocolate bar sesame snaps cupcake topping brownie. Tiramisu topping candy canes. Biscuit gummies powder brownie bonbon tootsie roll. Caramels chocolate toffee chocolate brownie candy chocolate jelly-o bear claw. Sugar plum icing gummi bears apple pie sweet sesame snaps wafer topping. Cheesecake caramels biscuit bonbon liquorice topping liquorice jelly beans. Oat cake marshmallow pudding cheesecake pie croissant dessert sweet. Croissant marshmallow biscuit donut. Chocolate cake apple pie sweet roll biscuit cupcake bonbon tart oat cake. Ice cream cotton candy pastry.
Applicake brownie candy canes sweet roll gummi bears applicake jelly-o. Toffee bonbon fruitcake. Wafer donut applicake. Chocolate sweet roll fruitcake. Oat cake dragée chupa chups gummies jelly beans gummies. Brownie macaroon marshmallow sweet. Croissant croissant jujubes. Soufflé pastry bonbon dessert gummi bears chocolate cake dragée macaroon gummies. Jelly pastry sweet roll jelly. Bear claw jelly-o chocolate bar. Caramels apple pie apple pie sweet chocolate cake jujubes tiramisu macaroon. Liquorice danish bonbon pastry cotton candy bear claw cookie oat cake. Lollipop sugar plum applicake cake marzipan caramels cotton candy. Candy danish lemon drops.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.