Another way to add jQuery to your HTML page without downloading and hosting it yourself, is to include it from a CDN (Content Delivery Network) like Google and Microsoft. You can save download time this way if users have visited others sites that point their jQuery to one of these CDNs.
jQuery’s syntax revolves around the idea of selecting or querying HTML elements and performing action on the elements. Below is the basic syntax:
The $ indicates it’s a jQuery. So if you see $ in an HTML page source, you know it’s using jQuery. The selector is pretty much like the CSS selector. The action defines what action needs to be done on the selected element. Below is an example jQuery code: