The Document Object Model is a programming interface for HTML.
An HTML document is available for us to manipulate as an object, and this object is structured like a tree:
Or this:
html
└── head
│ ├──title
│ ├──meta
│ ├──link[rel="stylesheet"]
| └──script[type="text/javascript"]
|
└── body
├── header
│ ├── h1
│ └── nav
└── section.simplicity
| └── h2
│ └── article
├── section.life
| └── h2
│ └── article
│ └── block_quote
│ └── block_quote
└── footer
console.dir
the variable0
property of the variable. This is the DOM object representation of the game board's elementTo access the element with "vanilla" JS, you would use
document.querySelector(".board")
console.dir(document)
console.dir(window)
. Try not to gasp.Checkout the jquery
branch.
Checkout the jquery
branch.
Here's an artist's interpretation of true beauty:
It's rather inadequate. Go to Nicholas Cage's Wikipedia page and copy the URL of your favorite image on the page. Then, use your browser's console and jQuery to replace the image above with the image of Nic Cage.
Go to CookieClicker. Click the cookie a few times.
Ain't nobody got time for this.
Watch this series of videos on making Math Minute