<script> setTimeout(function(){ $('.loader_bg').fadeToggle(); }, 1500); </script> <div class="loader_bg"> <div class="loader"></div> </div> I have a loader in my website . I want to show a loader for 1.5 sec to user till page fully load have achieved somewhat to this through j query but want it in pure javascript as haven't use any j query through out the project