I wanted to show a loading icon to users until the page elements are fully loaded. How can I do that with javascript and I want to do it with javascript, not jquery?
The easiest way to put the loader in the website.
HTML:
CSS:
#loading { position: fixed; width: 100%; height: 100vh; background: #fff url('images/loader.gif') no-repeat center center; z-index: 9999; }
JQUERY: