Your browser (Internet Explorer 7 or lower) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.

X

Navigate / search

Smashing jQuery Errata

During publishing of my book, Smashing jQuery it seems as though some errors have been introduced. The following is a list of the errors which I have spotted, if you find other errors, please fill out this form and I will make sure they get added to this list.

Page 33

The code block below shows up twice on the bottom of the page, it should only be there once.

$(window).load {
  //jQuery Code Goes Here
  alert("This window has been loaded.");
});
$(window).load {
  //jQuery Code Goes Here
  alert("This window has been loaded.");
});
Page 51

The following code is incorrect:

$('.book-one, .book-two, .book-three, .book-four, .book-five, #header, #footer p').css('background'’’,'#ccc'’’);

It should be changed to:

$('.book-one, .book-two, .book-three, .book-four, .book-five, #header, #footer p').css('background','#ccc');
Page 57

The following code is incorrect:

$('.content:has(p)').css('font-size'’’,'18px'’’);

It should be changed to:

$('.content:has(p)').css('font-size','18px');
Page 76

The code block below shows up twice on the bottom of the page, it should only be there once.

$(window).bind('unload', function() {
  alert('You have not finished filling out the form. Are you sure you want to leave?');
}
Page 77

The code block below shows up twice on the bottom of the page, it should only be there once.

$(window).unload(function() {
  alert('You have not finished filling out the form. Are you sure you want to leave?');
}
Page 78, 79

The code block below is missing single or double quotes around the click event handler.
The following code is incorrect:

$(document).ready(function() {
	$('.mylink').bind(click, alertMe)
}

It should be changed to:

$(document).ready(function() {
	$('.mylink').bind('click', alertMe)
}
Page 123

On step 7:

var slideText 

should be:

var slideNum 

On step 9:

var slideText 

should be:

var slideNum 

On step 9:
Anywhere slideText is referenced it should be replaced with slideNum

Leave a comment

name

email (not published)

website