7. Manipulating Web Page Elements Dynamically

At the heart of dynamic programming is programmatically altering the existing web page elements on the fly to react to user input. This provides the rich interactive experience that people are beginning to expect from all web sites.

jQuery and JavaScript provide several methods to easily alter the appearance, style, and content of the page elements, from changing an image source and paragraph content to dynamically highlighting text and container borders.

The following sections describe how to utilize jQuery and JavaScript to access and manipulate the web page elements.

Get jQuery and JavaScript Phrasebook 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.