+ 3
What is the best way to load a jquery on a web page?
I can see that integrating third party libraries with jquery is sometimes very confusing and tricky. Suppose if I integrate bootstrap library, jquery library is loaded end of the body with bootstrap bundle scripts. I have seen many websites that jquery is linked on head and do jquery related task when document is ready. What do you think the best approach can be to solve this problem?
4 odpowiedzi
+ 3
No i mean what is the best place to load jquery? is it head or very bottom of body tag?
+ 2
Shimax It is common practice to import stylesheets and scripts (like jQuery, Bootstrap, SweetAlert, FontAwesome etc.) in the <head> element.
+ 2
thanks Rowsej
+ 1
Do you mean that you’re loading Bootstrap with jQuery? You can include the link(s) for Bootstrap directly - copy and paste from https://getbootstrap.com (you may have to scroll down a bit).