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.