Slow scrolling to a point on a page
Create the “sticky” navigation bar
Hyphenate the text on the web page
Create a “lightbox” effect to display images
Display colour versions of code fragments
Properly display equations on the web page
“What’s the difference?” you ask
The jQuery library is not built into web browsers and we have to load it before we can use it.
HTML — the web page content
CSS — The web page appearance
|†1||Object oriented language (OOL) is model for a programming language that is based around an “object” rather than actions (action driven languages are called procedural languages). Objects are concepts that are eventually turned into code and data; objects can be reused and modified in a very controlled way. OOL is considered to be faster to develop, easier to understand and generally more efficient than procedural programming. Virtually all modern programming languages are object oriented.|
Save the file and start live preview (or open the file in a web browser). The result will be something like this:
The jQuery library is a standard library and is maintained by the JS Foundation, it has its own jQuery website. jQuery is used by virtually everyone: Google, Netflix, Microsoft, pretty much all the large web companies. There are some statistics that show that 79% of the top one million websites all use jQuery — so we’re probably in good company (unless of course the top one million websites are all porn sites; it wouldn’t surprise me).
So what can we do with jQuery?
There are many uses for jQuery, the main ones that we will use are:
Event detection (detects clicks and scroll operations)
Select and change elements on a web page
Other common uses (though not so much on this website) are:
Effects and animations
Send and receive information from a server
The jQuery library is very extensive, it’s been under development since 2006 and it is currently at version 3.3.1 (released January 2018).
The library supports a lot of functions (methods), this is a full list, most of which I don’t understand.