1/* Adding the script tag to the head as suggested before */
2
3 var head = document.getElementsByTagName('head')[0];
4 var script = document.createElement('script');
5 script.type = 'text/javascript';
6 script.src = "http://code.jquery.com/jquery-2.2.1.min.js";
7
8 // Then bind the event to the callback function.
9 // There are several events for cross browser compatibility.
10 script.onreadystatechange = handler;
11 script.onload = handler;
12
13 // Fire the loading
14 head.appendChild(script);
15
16 function handler(){
17 console.log('jquery added :)');
18 }
1<!--You can insert Jquery into HTML with the <script> tag in the <head>-->
2<!--Insert the next line of code into your <head> tags.-->
3<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <!-- jquery (help with javascript) -->
1$(".demo").prepend("Yo!"); // adds content at the beginning in the selected elements
2$(".demo").append("<em>Hey!</em>"); // adds content at the end in the selected elements
3$(".demo").before("Cheers"); // adds content before the selected elements
4$(".demo").after("<em>Peace</em>"); // adds content after the selected elements
5