HTML5 Games: Creating Fun with HTML5, CSS3, and WebGL typo

I recently started reading a book titled “HTML5 Games: Creating Fun with HTML5, CSS3, and WebGL”  and it’s good so far. But I found a small typo at the beginning so share it here:

Listing 2.8 The Initial Game Module

function showScreen(screenId) {
var activeScreen = $(“#game .screen.active”)[0],
screen = $(“#” + screenId)[0];

if (activeScreen) {

// dom.removeClass(screen, “active”);  wrong!
dom.removeClass(activeScreen, “active”);
}

I believed so far the Kindle automatically updates downloaded contents with latest version so that I don’t need manually searching typo pages, but apparently it seems not. I downloaded the sample source code package from its publisher web site and verified that it contains the fixed ‘working’ version by the way. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s