Chapter 2

Livening Up Your Page with Events and Animation

IN THIS CHAPTER

check Figuring out events

check Handling mouse clicks, key presses, and more

check Showing, hiding, and fading elements

check Moving elements around the page

check Animating CSS properties

Today’s web animation can be built with the same tools we’ve always used to design and build the web: CSS and JavaScript. That is a huge amount of power and a vast arena in which to be creative.

— VAL HEAD

HTML, CSS, JavaScript, and jQuery are among the web development world’s most powerful tools, enabling you to create pages and entire sites that look great and work flawlessly (well, as close to flawlessly as the complexity of the web allows). But there’s a problem with most of the web pages built using these tools: The pages just kind of sit there. Once the page loads, its content and its structure are fixed, immutable. You can’t click anything, you can’t change anything, nothing moves or jiggles, spins or flips, fades in or fades out. Sure, the page ...

Get Web Coding & Development All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.