In your header, you’ll need to include the above Javascript file (adapted from here)
You’ll also need jQuery and Bootstrap, of course.
Create a Bootstrap button in your HTML. We’ll attach a loading class to this so we can manipulate it in Javascript later.
Let’s go ahead and initialize the button.
Now, here’s a real-life example of how to use this. When we call the function .progressIncrement() on $(‘#progressBtn’), we’ll specify an integer (which represents a percentage) to increment the progress by.
For example, .progressIncrement(50) would halfway-fill the progress bar.