jQuery - simple demo
The HTML
"View source"
Buttons initially have no JS associated with them:
The JS
"View source"
Assigns functions to buttons.
Functions do some jQuery things using
jQuery selectors.
Things you could do
- Change "jQuery" to "$"
- Type function names manually in console.
- Remove .click statements and insert
onclick= into button HTML.
(Much debate about which style is better.)