This version is old school.
Please find jQuery plugins on npm.
Is Loading - Show feedback to your visitors
by Laurent Blanes
Easy jQuery plugin to show visual feedback when loading data or any action that would take time. Also can disable form elements and put an overlay an specified area or whole page.