Chapter 2
Livening Up Your Page with Events and Animation
IN THIS CHAPTER
Figuring out events
Handling mouse clicks, key presses, and more
Showing, hiding, and fading elements
Moving elements around the page
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 ...
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