To use jQuery libraries, you need to add a link on the HTMl page that imports them.



How to include jQuery library

If you have download jQuery library and hosted it on yours servers, using <script> tag with an SRC attribute, you can add it with link on HTML page.


Example with downloaded jQuery library:

<script src='jquery-3.4.1.min.js'></script>

The jQuery library link is always placed above the link for the javascript file, for example:

<script src='jquery-3.4.1.min.js'></script>
<script type="text/javascript" src="myJavascript.js"></script>

Otherwise there would be a conflict between them and the jQuery library would not work.




CDN links for jQuery libraries

Jquery libraries can be added to HTML pages in another way if they are imported by CDN (Content Delivery Network) from various servers hosted by jQueri.

Example jQuery CDN link:

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>



Example Google CDN link:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>



Example Microsoft CDN link:

<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js"></script>



Example Cloudflare CDN link:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>



Example jsDelivr CDN link:

<script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"></script>







Privacy Policy