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.
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.");
});
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');
The following code is incorrect:
$('.content:has(p)').css('font-size'’’,'18px'’’);
It should be changed to:
$('.content:has(p)').css('font-size','18px');
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?');
}
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?');
}
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)
}
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