Loader

Adds a loader for slow pages to show that something is happening.

Usage

This component works slightly differently to all others as it has to be inserted into the content after the opening body tag so that it can sit on top of everything and then hide when all content has loaded. It also does not rely on jQuery but is a couple of lines of vanilla JavaScript.

Example

Use this site!

Markup

<body>
	<script src="/assets/scripts/components/min/loader.min.js"></script>
	<!-- The rest of your markup and JS -->
</body>