add jquery in javascript code example
Example 1: html include jquery
<!-- Wrap inside the head tag -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Example 2: html how to add jquery
<!--You can insert Jquery into HTML with the <script> tag in the <head>-->
<!--Insert the next line of code into your <head> tags.-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <!-- jquery (help with javascript) -->
Example 3: add jquery in js
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = "http://code.jquery.com/jquery-2.2.1.min.js";
script.onreadystatechange = handler;
script.onload = handler;
head.appendChild(script);
function handler(){
console.log('jquery added :)');
}