Skip to Main Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner to intermediate content levelBeginner to intermediate
448 pages
13h 33m
English
O'Reilly Media, Inc.
Content preview from Head Rush Ajax
244
Chapter 4.5
Everyone’s a critic
If you enjoy music, you’ve probably got an opinion about
what you like to listen to... and what you don’t. Let’s use what
we’ve been learning about the DOM to build a web page for
rating the Top 5 blues CDs of all time.
Rather than spend a bunch of time writing HTML and CSS,
we’ve already taken care of putting a simple page together,
and adding some style. Open up the chapter04/ folder in
the source code for the book’s examples. You’ll see another
folder named top5, with some les and a sub-folder:
You’ll nd this in the
chapter4/ folder.
top5
images
<html>
.
.
.
</html>
top5.html
There are a bunch of
images in here, one for
each of the CD covers.
h1, h2 {
fon
col
}
p {
top5.css
Here’s the HTML for
the Top 5 page.
We’ve taken care of the
CSS for the page, too.
Which one do you like best?
the top 5 cds app
Here’s what all this
HTML and CSS looks
like in a browser...
you’re on your way 4
245
developing dom apps
You can click on
any of these CD
cover images.
When you click on a
CD, it should move
down into this Top 5
listing area.
You can click “Start Over”
to move all the CDs back
to the top of the page, and
create a new list.
Could you build this application without using the
DOM? How would it be different?
brain
power
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
Head First Ajax

Head First Ajax

Rebecca M. Riordan

Publisher Resources

ISBN: 0596102259Errata PageSupplemental Content