O'Reilly logo

AdvancED DOM Scripting: Dynamic Web Design Techniques by Aaron Gustafson, Jeffrey Sambells

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5. Dynamically Modifying Style and Cascading Style Sheets

In Chapter 1, I stressed the importance of separating your markup, behavior, and presentation. The problem with separating everything is that many aspects of the three layers overlap or even collide in an explosion messed-up code. You've already seen how to manipulate the DOM document structure in Chapter 3 and the behavioral event listeners in Chapter 4. Now it's time to discuss the presentation layer and how you can write scripts to modify your presentation. We'll explore ways to modify the presentation without embedding it in the script itself, though sometimes doing so will be unavoidable.

In this chapter, we'll briefly look at the key parts of the W3C DOM Level 2 Style specification ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required