Chapter 20. Accessing CSS from JavaScript

With a good understanding of the Document Object Model (DOM) and CSS now under your belt, you’ll learn in this chapter how to access both of these directly from JavaScript, enabling you to create highly dynamic and responsive websites.

I’ll also show you how to use interrupts so that you can create animations or provide any code that must continue running in the background of a web page, such as a clock, and I’ll explain how you can add new elements to or remove existing ones from the DOM so that you don’t have to precreate elements in HTML just in case JavaScript may need to access them later.

Get Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition 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.