Chapter 12. Cutting through attributes, properties, and CSS

This chapter covers

  • Understanding DOM attributes and DOM properties
  • Dealing with cross-browser attributes and styles
  • Handling element dimension properties
  • Discovering computed styles

Excepting the previous chapter, a large percentage of this book so far has dealt with JavaScript, the language. And although there are plenty of nuances to pure JavaScript as a language, once we throw the browser DOM into the mix, things can really get confusing.

Understanding DOM concepts and how JavaScript relates to these concepts is an important part of becoming a JavaScript ninja, especially considering the baffling ways that some DOM concepts seem to defy logic. The area of DOM attributes and ...

Get Secrets of the JavaScript Ninja 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.