Showing text dynamically in HTML

We have implemented the basic game mechanics in the previous sections. Our Ping Pong game is missing a scoring board that shows both players' scores. We discussed how to use jQuery to modify the CSS styles of the selected elements. Can we also alter the content of the selected elements with jQuery? Yes, we can.

Get HTML5 Game Development by Example : Beginner's Guide - Second 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.