Loading spin

This script has less than 1 Kbyte

The jSuites.loading is a lightweight JavaScript loading spin control. The example below will show the loading spin for 2 seconds.

The loading will stop after two seconds

Source code

<script src="https://jsuites.net/v4/jsuites.js"></script>
<link rel="stylesheet" href="https://jsuites.net/v4/jsuites.css" type="text/css" />

<input type='button' value='Show the loading' onclick="show()" class='jbutton dark'>

var show = function() {
    // Show the loading spin
    // Hide the loading spin after two seconds
    setTimeout(function() {
        // Hide
    }, 2000);