Skip to Content
Head Rush Ajax
book

Head Rush Ajax

by Brett McLaughlin
March 2006
Beginner 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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
Strange Code

Strange Code

Ronald T. Kneusel
How to Overcome a Power Deficit

How to Overcome a Power Deficit

Cyril Bouquet, Jean-Louis Barsoux

Publisher Resources

ISBN: 0596102259Errata Page