How to run jquery function as quickly as possible?

How to run jquery function as quickly as possible?

Faster than this:

$(document).ready(function(){
Preloader();
});
April 7th 20 at 15:26
3 answers
April 7th 20 at 15:28
Solution
in the head
Preloader();

But, you know what you have $(document).ready, waiting to load the entire DOM, and what does it mean and why?
<script src="/js/preloader.js"></script>

the <script> Preloader(); </script>
- Savanna57 commented on April 7th 20 at 15:31
April 7th 20 at 15:30
I wonder what you want to do that? If the preloader, it shows the HTML first, and then after full load using JS in hiding. And not Vice versa.
figured out

<script src="/js/preloader.js"></script>
the <script> Preloader(); </script>
- Savanna57 commented on April 7th 20 at 15:33
this challenge with the same success you can just put it in preloader.js and even easier was no challenge as such, but wrapped in a self-starting...
()()


or even to write functions at the starting point of preloader... - rick_Willms commented on April 7th 20 at 15:36
@veda75, but the way - Savanna57 commented on April 7th 20 at 15:39
April 7th 20 at 15:32
the <head>
the <script>
Preloader();
</script>
</head>


so?

Find more questions by tags JavaScriptjQuery