My friend read an article on net which mentioned that move all JavaScript file to the end of body closing tag (</body>
), this is a valid point to move all JS files to the end of body tag.
I have moved all JS files to the end except the JQuery and the JS files which are attaching event to an element on page, like below;
$(document).ready(function(){
//submit data
$("#create_video").click(function(){ //... });
});
but he's saying to move the jQuery library file to the end of body tag.
I don't think it is possible, because I am attaching many events to page elements on load using jQuery selectors, and to use jQuery selectors it is must to load jQuery library first.
Please tell me that is it possible to move JQuery library file to the end of page right before closing body tag (</body>
) ??
Thanks