The book provides everything you'll need to start using javascript and the Document Object Model to enhance your web pages with client-side dynamic effects and user-controlled animation. It shows how javascript, HTML5, and Cascading Style Sheets (CSS) work together to create usable, standards-compliant web designs. We'll also cover cross-browser compatibility with DOM scripts and how to make sure they degrade gracefully when javascript isn't available.
DOM Scripting: Web Design with javascript and the Document Object Model focuses on javascript for adding dynamic effects and manipulating page structure on the fly using the Document Object Model. You'll start with a crash course in javascript and the DOM, then move on to several real-world examples that you'll build from scratch, including dynamic image galleries and dynamic menus. You'll also learn how to manipulate web page styles using the CSS DOM, and create markup on the fly.
If you want to create websites that are beautiful, dynamic, accessible, and standards-compliant, this is the book for you!
What you’ll learn
Apply dynamic behavior to your pages without inserting javascript in your markup
Write scripts that degrade gracefully when javascript isn’t available
Use web standards to ensure cross-browser compatibility
Harness the power of the DOM to create user-controlled animation
Also includes an introduction to Ajax
Who this book is for
This book is for web developers wanting to expand their knowledge of the DOM to add interactivity and functionality to their web pages.
Table of Contents
A Brief History of javascript
javascript Syntax
The Document Object Model
A javascript Image Gallery
Best Practices
The Image Gallery Revisited
Creating Markup on the Fly
Enhancing Content
CSS-DOM
An Animated Slideshow
HTML5
Putting It All Together
DOM Scripting Libraries
Download