Is there a library that allows me to load jQuery at the bottom of the page, but still drag my html with $ (function () {})

I vaguely recall that someone came up with a solution to this problem, but I cannot let my life remember the name of the library. The main idea is that by loading one small library at the top of the page, you can get an advantage in rendering speed when loading other scripts at the bottom of the page, having the ability to queue the functions that will be executed when the DOM is ready. Thanks

+3
source share
1 answer

Are you thinking about Head JS ?

You read books and placed SRC SCRIPT tags below. Good. But can you do it?

// use jQuery on the body of the page even though it is not included yet
head.ready(function() {
   $("#my").jquery_plugin();
});

// load jQuery whenever you wish bottom of the page
head.js("/path/to/jquery.js");
+3

All Articles