JavaScript & jQuery: The Missing Manual

Errata for JavaScript & jQuery: The Missing Manual

Submit your own errata for this product.


The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Safari Books Online
NA
online examples

In the downloadable examples, in the Test Bed folder, in all six files, the following slide-out menu link contains a typographical error: <li><a href="http://juqeryui.com/">jQuery UI</a></li> Should read: <li><a href="http://jqueryui.com/">jQuery UI</a></li> That is, juqeryui.com should read jquery.com

Note from the Author or Editor:
This has been fixed. You can download the latest tutorial files from: https://github.com/sawmac/js2e/zipball/master

Anonymous  May 25, 2012  Jul 31, 2013
Safari Books Online
Getting jQuery
FREQUENTLY ASKED QUESTION: JQUERY VERSIONS

The sentence here makes no sense whatsoever, and looks like it was originally written while some v1.6.X was the "current" release but later partially updated for the v1.7.2 release. There is no "3" at the end of "v1.7.2", and if I already have v1.7.2 and a v1.6.8 comes out I will NOT be "upgrading" to it. And I quote (or cut&paste, as the case may be): "Finally, the last number, like the final 3 in jQuery 1.7.2, usually refers to some sort of bug fix for the 1.6 branch of jQuery. So if you’re using version 1.7.2 of jQuery and version 1.6.8 comes out, it’s usually a good idea to upgrade, as this will probably include fixes from problems discovered in 1.7.2."

Note from the Author or Editor:
change to "Finally, the last number, like the final 3 in jQuery 1.7.3, usually refers to some sort of bug fix for the 1.6 branch of jQuery. So if you’re using version 1.7.2 of jQuery and version 1.7.3 comes out, it’s usually a good idea to upgrade, as this will probably include fixes from problems discovered in 1.7.2."

Lauri Loebel Carpenter  Jun 26, 2012  Aug 16, 2013
PDF, Other Digital Version
Page 5
fourth paragraph

On the PDF version this is on page 5 (23/538) On the kindle .mobi version, this is location 631 "any of the four document types" should read "any of the five document types" four -> five In the paragraph above the five types of HTML are described. In the beginning of the same sentence 'five common doctypes' are described. The follow up reads 'any of the four document types', which is inconsistent. (This is likely from a previous version without HTML5)

Note from the Author or Editor:
page 5 paragraph above note, second sentence should end with "using any of the five document types without problem."

Anonymous  Nov 12, 2011  Dec 22, 2011
Printed, PDF
Page 26
Bottom example

The bottommost example on page 26 of the print, and I presume, PDF versions at least, reads: <!doctype html> <html> <head> <meta charset="UTF-8"> <head> <title>My Web Page</title> <script> alert('hello world!'); </script> </head> This example features an amazing 2 <head> tags, one before the <meta> tag and one after. Obviously, there should only be one and it should be the one before the <meta> tag.

Note from the Author or Editor:
page 26, last chunk of code change <head> <meta charset ="UTF-8"> <head> <title>My Web Page</title> to <head> <meta charset ="UTF-8"> <title>My Web Page</title> In other words remove second appearance of </head>

Joseph Kneebone  Dec 11, 2011  Dec 22, 2011
Printed
Page 33 and 34
Step 2 and step 7

This line of code: <script src="../_js/jquery-1.6.3.min.js"></script> should be updated to: <script src="../_js/jquery-1.7.2.min.js"></script>

Anna Leeg  Dec 04, 2012  Aug 16, 2013
Printed
Page 34
step #7

Final code missing info. Should read: <script> $(document).ready(function() { $('body').hide().fadeIn(3000); }); </script>

Anonymous  Nov 08, 2011  Dec 22, 2011
Printed
Page 53
Note

The note discusses some type conversions and introduces the variable shoePrice for an example; later, the note refers to the previous variable as showPrice (it should be shoePrice again). Minor typo.

Note from the Author or Editor:
page 53, note, last sentence change showPrice to shoePrice

ijkilchenko  Jun 05, 2013  Aug 16, 2013
Printed, PDF
Page 63
Paragraph below "Adding an item to the end of an array", third line (line 13 from bottom).

"...you've have created..." should be changed to "...you've created..." or "...you have created...".

Ali Rahmjoo  Jul 29, 2012  Aug 16, 2013
PDF, Other Digital Version
Page 72
Second code listing, first line comment.

PDF edition page 72 (90/538) Kindle edition location 2680 I the second code listing, first line comment, "an Boolean object" should read "a Boolean object" as it does in the last comment in the first code listing. The listing currently reads: var data = false; // an Boolean object and should read var data = false; // a Boolean object

Anonymous  Nov 18, 2011  Dec 22, 2011
Printed
Page 80
Table 3-1, "Strict equal to"

"For example, while '2'==2 is true, '2' = = = 2 is not true" Because the there is no space between the double "equals" signs of the first statement, it looks like a single, elongated "equals" sign. "'2' = = 2" would be better, and in keeping with the format of the other statements on the page.

Paul  Apr 07, 2013  Aug 16, 2013
Printed
Page 85
Figure 3-4, final alert box

Change alert('Looks like you'll be watching TV.); to alert("Looks like you'll be watching TV.");

Anonymous  Sep 18, 2012  Aug 16, 2013
Printed
Page 92
paragraph in step #9 of tutorial

"You can learn about this command on page 464..." should read "You can learn about this command on page 446...".

Anonymous  May 19, 2012  Jun 01, 2012
Printed
Page 96
United States

Figure 3-6 Last Line should read as follows: The final result of this script will be "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday, ".

Note from the Author or Editor:
Change last sentence of Figyre 3-6 to: The final result of this script will be "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday,." Notice that there's a comma after Sunday as well.

Brett Santore  Jul 15, 2013  Aug 16, 2013
Printed
Page 97
1st Paragraph

the last line.... "shown on page 96:" should be, "shown on page 95:"

Barry  Nov 10, 2011  Dec 22, 2011
Printed
Page 97
Last Paragraph

"Figure 3-5" should be "Figure 3-6"

Barry  Nov 10, 2011  Dec 22, 2011
Printed
Page 97
Last sentence in 3rd paragraph

Change As with while loops, the stuff inside curly braces (document.write(`Number ` + num + `<br>'); in this example) to As with while loops, the stuff inside curly braces (document.write('Number ' + num + '<br>'); in this example) In other words, use consistent quote marks in the italicized text.

Anonymous  Sep 18, 2012  Aug 16, 2013
Printed
Page 111
Item 7, in bold

Change Click after the ]; (the end of the answers array) to Click after the ]; (the end of the questions array)

Anonymous  Sep 18, 2012  Aug 16, 2013
Printed
Page 117
2nd Paragraph, First Line

Change "That's why this books covers..." to "That's why this book covers"

Anonymous  Feb 24, 2012  Jun 01, 2012
Printed
Page 129
"Workaround Workship Box" at the top of the page

In the first line, "tranditionally" should be "traditionally"

Barry  Nov 11, 2011  Dec 22, 2011
Printed
Page 134
1st bullet point

The example given for the attribute selector, $(a[href]) does not contain inverted commas around the attribute selector, whereas the preceeding example does, i.e. $('img[alt]').

Note from the Author or Editor:
First bullet point, change $(a[href]) to $('a[href]')

John Gill  Jan 28, 2013  Aug 16, 2013
Printed, Other Digital Version
Page 138
content_functions.html

Testbed "content_functions.html" contains the <h1> element "Regular Expression Tester." It should say "Content Functions Tester" (or similar) instead. (This testbed is referenced on page 138 of the printed book. The error is in the html testbed file itself.)

Note from the Author or Editor:
We've updated the tutorial files to fix this mistake.

jeffstraw  May 21, 2013  Jul 31, 2013
Printed
Page 141
4th bullet in Helpful Tool Alert

There should be a closing parentheses before the period.

Note from the Author or Editor:
should read: (choose Safari -> Preferences, click the Advanced button, and make sure the "Show Develop menu in menu bar" is checked).

Anonymous  Mar 29, 2012  Jun 01, 2012
PDF
Page 145
Figure 4-5

Earlier on the page text says "After each property name, you insert a colon (:) followed by a value; each name/value pair is separated by a comma, and the whole shebang is surrounded by braces—{}." However it the Figure 4-5 there are commas after properties: { 'background-color' , '#FF0000', 'border' , '2px solid #FE0037' } as it should be { 'background-color' : '#FF0000', 'border' : '2px solid #FE0037' }

Note from the Author or Editor:
Figure 4-5, replace commas after 'background-color' and 'border' with colons

jjj2  Nov 13, 2011  Dec 22, 2011
Printed
Page 152
Steps 2 and 3

For Step 2 the closing script tag should be, </script> For Step 3 line 1, the closing script tag should be, </script>

Note from the Author or Editor:
step 2, change the last <script> to </script> in step 3, line 1, same change

Barry  Nov 17, 2011  Dec 22, 2011
Printed
Page 153
Steps 4,5 and 6

In line 1 of Steps 4,5, and 6 the closing script tag should be, </script>

Note from the Author or Editor:
line 1 in steps 4, 5 and 6 should read <script src="../_js/jquery-1.6.3.min.js"></script> in other words, at the end of the line change <script> to </script>

Barry  Nov 17, 2011  Dec 22, 2011
Printed
Page 154-155
Step8 and Step 10

Step 8: jquery-1.6.3.min.js was not shipped with the book. Step 10: class pq is not defined in site.css file supplied. Therefore this tutorial doesn't work

Note from the Author or Editor:
Step 8: We updated the files for a newer version of jQuery to keep the book up-to-date. The newer version included with the tutorials works just fine. Simply reference the query-1.7.2.min.js file like this: <script src="../_js/jquery-1.7.2.min.js"></script> Sorry for the inconvenience. We updated this in the text, but you must have one of the earlier printings of the book. For the rest of the book, just use the jquery-1.7.2.min.js file Step 10: The pg class is not actually used for styling, therefore you don't need a .pq style in the stylesheet. Instead, the <span class="pq"> is simply used as a way of "tagging" the text that needs to be turned into a pullquote box. jQuery looks for that class, and when it finds it, jQuery clones that element, removes the pq class (since it's not needed) and adds another class pullquote which accomplishes all of the styling for the pullquote. You'll often see classes used on elements to help identify them for manipulation with JavaScript and jQuery, without any accompanying CSS class style. Hope that helps. If you look at the finished file -- complete_pullquote.html -- you'll see that it does work. Sorry for any confusion -- Dave McFarland

Sipo Ching  Sep 23, 2012 
Printed
Page 179
last paragraph

In the last paragraph above the code: "Here's the code above rewritten, calling the bind() function only once and passing it an object literal (in bold), but nothing is in bold.

Note from the Author or Editor:
page 179, last code example, the following should be bold: { 'click' : function() { // do something interesting }, // end click function 'mouseover' : function() { //do something interesting }; // end mouseover function }

yang.cs  May 27, 2012  Jun 01, 2012
Printed, PDF
Page 179
last code example

page 179, last code example, there is an extra ";" on the second line from the last (before "// end mouseover function"), resulting in the entire function not work. { 'click' : function() { // do something interesting }, // end click function 'mouseover' : function() { //do something interesting }; // end mouseover function } should be: { 'click' : function() { // do something interesting }, // end click function 'mouseover' : function() { //do something interesting } // end mouseover function }

Jason  Mar 04, 2013  Aug 16, 2013
Printed
Page 181
Step 6

In line 5 of Step 6, #main should be .main This also applies for line 5 for Steps 8 and 9 (on pages 182,183)

Note from the Author or Editor:
step 6, line 5 change $('#main h2').toggle( to $('.main h2').toggle( in other words, change #main to .main

Barry  Nov 18, 2011  Dec 22, 2011
Printed
Page 181
Step 4

In Step 4, "typed in step 2" should be, "typed in step 3"

Barry  Jun 01, 2012  Aug 16, 2013
Printed, PDF
Page 182
Step 7, Line 6

"...the code .next('answer') finds the first tag following the <h2> that also has the class answer applied to it." Should read "...the code .next('.answer') finds the first tag following the <h2> that also has the class answer applied to it." Put a '.' before answer in the brackets.

Joe Kneebone  Dec 15, 2011  Dec 22, 2011
Printed
Page 182
step 8 linenumber 5 of one-page faq tutorial

line number 5 of step 8 in the one-page faq tutorial is: $('#main h2').toggle(....) This selector selects an element with the id of 'main', however in the html, the div has a class 'main', not an id. So changing the above line to $('.main h2').toggle(...) makes the one-page faq work. greetings, Anthony

Note from the Author or Editor:
Page 181, step 6, line 5 of code should read $('.main h2').toggle( Page 182, step 8, line 5 of code should read $('.main h2').toggle( Page 183, step 9, line 5 of code should read $('.main h2').toggle(

Anthony Candaele  Jun 04, 2012  Aug 16, 2013
Printed, PDF, Safari Books Online
Page 182
United States

This is an addendum to my two previous comments involving the Chapter 5 tutorial that this page 182 falls in. Again, if you're using a more recent 1.9.x jQuery (for the potential challenges), which removed the version of toggle() that this tutorial uses, the issue can test your jQuery resourcefulness and understanding. To completely replicate the results of this tutorial with a 1.9+ version of jQuery, at Step 3, and ignoring the rest of the steps except for the explanations, either type the code below or don't look below and go to the jQuery site to try to figure it out by yourself. $('.main h2').click( function() { $(this).next().slideToggle(); $(this).toggleClass('close'); } ); // click() end

Setia Diem  Apr 22, 2013 
Printed
Page 195
Sentence above the Tip.

Sentence states ". . . as if the element where bouncing." but should be were.

Note from the Author or Editor:
should read "as if the element were bouncing."

David White  Nov 23, 2011  Dec 22, 2011
Printed
Page 195
animate() function code snippet at bottom of page

path to script files is missing a leading underscore, should be: <script src="_js/jquery-1.6.3min.js"></script> <script src="_js/jquery.easing.1.3.js"></script

Note from the Author or Editor:
Change "js/" to "_js/" in lines 1 and 2.

Anonymous  May 25, 2013  Aug 16, 2013
Printed
Page 197
Paragraph between notes

File multiple-callbacks.html from chapter 6 works in Firefox, but not in Explorer 9. After I removed comma inside the literal object after left: '+=400px' { left: '+=400px' }, code works in IE.

Note from the Author or Editor:
page 197, second block of code, line 3 change left: '+=400px', to "left: '+=400px' (remove the comma at the end of that code)

Anonymous  Aug 20, 2012  Aug 16, 2013
Printed
Page 201

The first paragraph "jQuery plug-ins...." is a duplicate of the paragraph on page 200, step 2, below the code.

Note from the Author or Editor:
Replace first paragraph after code that begins with "jQuery plug-ins.." with "jQuery's .hover() function is a bit wild looking when you've finished adding all of its programming (see step 12). However, it's really just a function that accepts two anonymous functions as arguments . It's a good idea to add the "shells" of the anonymous functions first -- so you can make sure you've set it up correctly -- before adding all of the programming inside the functions."

Anonymous  Apr 02, 2012  Jun 01, 2012
Printed
Page 202
Step 8

In Step 8, the line following, backgroundColor: 'rgb(255,255,255)' is missing a comma. The line should be, },

Barry  Nov 23, 2011  Dec 22, 2011
Printed
Page 202
Step 7

"press Returns" should be, "press Return"

Barry  Jun 04, 2012  Aug 16, 2013
Printed
Page 203
Step 12

In Step 12, the line following, backgroundColor: 'rgb(255,255,255)' is missing a comma. The line should be, },

Barry  Nov 23, 2011  Dec 22, 2011
Printed
Page 203
Example 12

The color animation function in complete_animate.html (Ch 6) did not work for me. After checking on stackoverflow, I suspected it might be due to the wrong version of being supplied jquery.color.js for the version of jquery being used (jquery-1.7.2.min.js). I downloaded jquery.animate-colors-min.js (for jQuery 1.7.2 and earlier) from http://www.bitstorm.org/jquery/color-animation/ and the problem is now solved.

Note from the Author or Editor:
We've uploaded new Tutorial files to fix this problem.

Richard Stibbard  Feb 01, 2013  Jul 31, 2013
Printed
Page 207
3rd paragraph

"(for example, see www.monkeyflash.com/css/image-rollover-navbar/)", link is out-of-date, returns 404 error.

Note from the Author or Editor:
remove the parenthetical expression

Anonymous  Jun 20, 2012  Aug 16, 2013
PDF
Page 211
2nd paragraph

Line 6 appears twice in the code listing. Remove the first instance. The corrected listing should read 1 <script src="js/jquery-1.6.3.min.js"></script> 2 <script> 3 $(document).ready(function() { 4 var newPhoto = new Image(); 5 newPhoto.src = 'images/newImage.jpg'; 6 var oldSrc = $('#photo').attr('src'); 7 $('h1').hover( 8 function() { 9 $('#photo').attr('src', newPhoto.src); 10 }, 11 function() { 12 $('#photo').attr('src', oldSrc); 13 }); // end hover 14 }); // end ready 15 </script>

Anonymous  Apr 29, 2013  Aug 16, 2013
Printed
Page 214
Step 4

A period should not appear at the end of the line of code. The line should end at the semi-colon.

Note from the Author or Editor:
remove period. code should look like this: var imgFile = $(this).attr('src');

Anonymous  Apr 05, 2012  Jun 01, 2012
Other Digital Version
222
first paragraph

The link www.huddletogether.com/projects/lightbox2/ is broken. A 'not found' page is displayed.

Note from the Author or Editor:
Paragraph following headline "Advanced Gallery with jQuery FancyBox" change link www.huddletogether.com/projects/lightbox2/ to http://lokeshdhakar.com/projects/lightbox2/

Anonymous  Mar 07, 2012  Jun 01, 2012
Printed
Page 224
Step 3

In the link href line, 1.3.4.css".css" should be, 1.3.4.css"

Barry  Dec 12, 2011  Dec 22, 2011
Printed
Page 226
In the FancyBox options section

The Hex values for the overlayColor should match: code value=#F64, discussion value is, #F65.

Note from the Author or Editor:
Page 226, last paragraph, first sentence: change "#F65" to "#F64"

Barry  Dec 12, 2011  Dec 22, 2011
Printed
Page 226
program code in the FancyBox options section

The last line of the object literal should have the comma removed. The line should be, transitionOut: 'elastic'

Barry  Dec 12, 2011  Dec 22, 2011
Printed
Page 228
Program code in the 3rd Paragraph

In the object literal, the transitionOut needs a comma at the end. The line should read, transitionOut : 'elastic',

Barry  Dec 12, 2011  Dec 22, 2011
Printed
Page 228
titlePosition Paragraph: 3rd to last line

The option, over, should be in italics. This is to be consistent with the options: outside and inside being italicized.

Barry  Feb 02, 2012  Apr 06, 2012
Printed
Page 229
Last sentence prior to Figure 7-7

Sentence says "You can find read more . . ." but should be either find or read, not both.

Note from the Author or Editor:
remove the word "find", should read: You can read more about the CSS sprites technique...

David White  Nov 26, 2011  Dec 22, 2011
PDF
Page 238
2nd paragraph

the book states: line 3 displays the hidden form. Line 2 is the part that tells the web browser “Stop! Don’t follow that link.” It seems to me that lines 3 and 2 perhaps should be reversed.

Note from the Author or Editor:
Page 238, second paragraph of main body text, first line should read: Lin 1 accomplishes both steps 1 and 2 above; line 2 displays the hidden form. Line 3 is the part that tells the web browser "Stop! Don't follow that link."

Sruli  Dec 04, 2011  Dec 22, 2011
Printed
Page 247
Step 6

"FancyBox accepts mean different settings" should be "FancyBox accepts many different settings"

Barry  Feb 02, 2012  Apr 06, 2012
Printed
Page 249
Step 5. Line 6

titlePosition line should not have a comma at the end as it is the last value.

Note from the Author or Editor:
remove comma from line 6 of code. should just read: titlePosition: 'outside'

David White  Nov 26, 2011  Dec 22, 2011
PDF
Page 249
1st paragraph, line 10

on the line 10 you wrote : 8 }); end ready() end ready is a comment, I think it should be : 8 }); // end ready()

Malek  Oct 31, 2012  Aug 16, 2013
Printed
Page 253
4th bullet

"Figure 8-4" should be, "Figure 8-3" Two places.

Barry  Jun 04, 2012  Aug 16, 2013
Printed
Page 253
4th bullet

The fourth bullet item contains two errors. The first error is in the first sentence which should read ...opens off of a button... The second and more serious error is the reference to figure 8-4. There is no figure 8-4. These should refer to figure 8-3.

Brantly  Jun 24, 2012  Aug 16, 2013
Printed
Page 258
2nd Paragraph

In the 7th line of the HTML listed, "heliisking" should likely be, "heliskiing"

Barry  Nov 28, 2011  Dec 22, 2011
Printed
Page 261
3rd paragraph

For the last line of the paragraph, the JavaScript line, '#state:selected' should be ' #state :selected' Per paragraph 4, a space is needed between the ID name (state) and the selector.

Note from the Author or Editor:
line of code in the middle of the page, change from var selectedState=$('#state:selected').val(); to var selectedState=$('#state :selected').val(); in other words, add a SPACE between #state and :selected

Barry  Nov 28, 2011  Dec 22, 2011
Printed
Page 274
Step 4

For Step 4 the line, $('#name').focus() It should be highlighted that the specific selector name of, '#name' is now entered, instead of the generic jQuery selector of, ':text:first' as listed in Step 2.

Note from the Author or Editor:
Page 274, second line of code for step 4: change $('#name').focus(); to $(':text:first').focus(); Change also applies to line 2 of steps 5 and 6

Barry  Nov 29, 2011  Dec 22, 2011
Printed
Page 277
Step 4

Step 4, line 3 should read: $(':text:first').focus(); Step 4, line 6 is missing a single quote after the color choice: .css('backgroundColor', '#CCC'); Step 4, line 7 is missing a single quote after the color choice: $('#creditCard label').css('color', '#BBB');

Anonymous  Apr 30, 2012  Jun 01, 2012
Printed
Page 281
1st Paragraph in the Basic Validation section

"page 278" should be "page 284"

Barry  Nov 29, 2011  Dec 22, 2011
Printed
Page 297
"Validating Checkboxes..." 1st paragraph

The end of the last sentence should read: "...to quickly validate these form fields." Change "this" to "these"

Note from the Author or Editor:
paragraph after headline "Validating Checkboxes and Radio Buttons", end of last sentence. Change "quickly validate this form fields." to "quickly validate these types of form fields."

Anonymous  May 01, 2012  Jun 01, 2012
Printed
Page 299
Line 13 of the script listed

It seems line 13 is not part of the program discussed Line 13 is, spam: "required"

Note from the Author or Editor:
remove line 13 spam:required" from the code example on page 299

Barry  Feb 07, 2012  Apr 06, 2012
Printed
Page 299
Line 12 of the script

Since line 13 has been removed from the script (see "Confirmed Errata", "Page 299"), line 12 should not end with a comma. Change Line 12 from confirm_password: {equalTo:'#password'}, to confirm_password: {equalTo:'#password'}

Paul  Apr 04, 2013  Aug 16, 2013
Printed
Page 300
Step 3 (near bottom of page)

There is no CSS rule to correct the formatting of the validate-generated error message for indented fields. Specifically, "Please select an option" shows up to the right of where it is shown in Figure 9-7 on page 291 for the radio buttons under "Would you like to receive annoying e-mail from us?". The provided file complete_validation.html corrects this by adding a CSS rule, which should be included in the tutorial as a final step: #signup .indent label.error { margin-left: 0; }

Note from the Author or Editor:
fixed in the latest tutorial files

Jeremy  Dec 22, 2012  Jul 31, 2013
Printed
Page 305
The panel container paragraph (3rd from bottom of the page)

It seems the following sentence needs to be rewritten for clarity: The style for the div tag that surrounds all of the panels requires is important.

Note from the Author or Editor:
change: "The style for the div tag that surrounds all of the panels is important:" to "The style for the div tag that surrounds all of the panels.

Barry  Feb 07, 2012  Apr 06, 2012
Printed
Page 305
The panel container paragraph (3rd from bottom of the page)

Error in Author/Editor's correction: change: "The style for the div tag that surrounds all of the panels is important:" to "The style for the div tag that surrounds all of the panels. Should read: change: "The style for the div tag that surrounds all of the panels requires is important:" to "The style for the div tag that surrounds all of the panels is important:"

Paul  Apr 04, 2013  Aug 16, 2013
PDF
Page 308
step 3

In step 3, the instruction is: $this = $(this); I think that it should say: var $this = $(this); Additionally, I checked the source code for the complete_tabs.html, and it was indeed listed there with "var".

Note from the Author or Editor:
page 308, step 3 line 2 of code should read: var $this = $(this); This applies also to line 2 of steps 4, 5, 6, 7 and 8

Sruli  Dec 06, 2011  Dec 22, 2011
PDF
Page 310
step 8

step 8, line 2: extra $(

Note from the Author or Editor:
step 8, line 2, remove the first $( line should read $('.tabs a').click(function() {

Sruli  Dec 06, 2011  Dec 22, 2011
Printed
Page 316
2nd paragraph under "Custominzing ..." heading

Looks like missing text from within the parentheses ... "(each arrow is 45x140 pixels, the drop shadow)" ....

Note from the Author or Editor:
remove the parenthetical expression

Don  Nov 11, 2012  Aug 16, 2013
PDF
Page 331
step 8

in step 8, line 3: I think that ttRight should be ttTop

Note from the Author or Editor:
pages 331-338: replace every instance of ttRight with ttTop. For example, step 8, page 331, line 3 of code should be ttTop Same for line 3 in steps 9, 10, 11, 12 13, 15, and 16.

Sruli  Dec 06, 2011  Dec 22, 2011
Printed
Page 332
Step10 2nd Paragraph

On the third line from the end of the 2nd paragraph, "variable named tip" should be "variable named $tip"

Barry  Feb 07, 2012  Apr 06, 2012
Printed
Page 351
Up To Speed box

In the last paragraph in the "Up To Speed" box, the link for PHP 101 is outdated. The link from Zend for PHP 101 is below: http://devzone.calevans.com/6/php-101--php-for-the-absolute-beginner/

Note from the Author or Editor:
in the up to speed box, replace http://devzone.zend.com/node/view/id/627 with http://devzone.zend.com/6/php-101-php-for-the-absolute-beginner/

Barry  Nov 16, 2011  Dec 22, 2011
Printed
Page 353
Step 1 of the Tutorial

It seems the "load.html" file is the corrected one, complete_load.html.

Note from the Author or Editor:
The tutorial files have been updated. You can find the latest version of the tutorial files at: https://github.com/sawmac/js2e/zipball/master

Barry  Feb 08, 2012  Jul 31, 2013
Printed, PDF, Safari Books Online, Other Digital Version
Page 354
Whole tutorial

In case anybody comes here looking, this tutorial (The load() function, chapter 11, starting pg 352) does not work in Google Chrome if the files are being accessed from a local host. You can use any other browser or use it from a remote server.

Note from the Author or Editor:
The load function doesn't work for a local file in Google Chrome. For example, opening the complete_load.html file in Google Chrome won't work. For security reasons, that browser won't allow loading a local file in this way. Use another browser like IE, Safari or Firefox. The example, will work with any browser if the files are moved onto a web server.

Joe Kneebone  Dec 18, 2011 
Printed
Page 356
Step 8

the last line of Step 8 "chapter 12" should be "chapter 11"

Note from the Author or Editor:
last line of paragraph following step 8. Change "in the chapter12 file" to "in the chapter12 folder"

Barry  Nov 15, 2011  Dec 22, 2011
Printed
Page 356
Line 3

Selector added to load statement is for an ID (#) rather than a Class (.). Added code should be + ' .newsItem' rather than + ' #newsItem'.

Note from the Author or Editor:
-- we'll update the tutorial files, so that they are accurate to the text --

David White  Dec 05, 2011  Dec 22, 2011
Printed
Page 356
code at top

The html files define newsItem with an id. The JavaScript and css files reference .newsItem instead of #newsitem.

Note from the Author or Editor:
-- fixed in tutorial files: https://github.com/sawmac/js2e/zipball/master

Bob  May 29, 2012  Jul 31, 2013
Printed
Page 359
3rd Paragraph.

"You supply the endcodeURIComponent()" should be "You supply the encodeURIComponent()" There is an added "d" in the method name.

Barry  Feb 09, 2012  Apr 06, 2012
Printed
Page 368
Step 7

In line 5 of Step 7, ('#formwrapper) should be, ('#formwrapper') Line 7 is: }} Line 7 should be: }

Note from the Author or Editor:
step 7, line 5 is missing a closing ' mark. $('#formwrapper) should be $('#formwarpper') line 7 should be }

Barry  Nov 15, 2011  Dec 22, 2011
Printed
Page 369
Step 10

In line 6 of Step 10, ('#formwrapper) should be, ('#formwrapper')

Note from the Author or Editor:
step 10 line 6 is missing a closing ' mark. $('#formwrapper) should be $('#formwrapper')

Barry  Nov 15, 2011  Dec 22, 2011
Printed
Page 369
line 5

I believe there are A few print errors in the book for the login tutorial... page 368 line 5....."$('#formwrapper ).prepend('<p id="fail">Incorrect login information. Please try again</p>');" should be $('#formwrapper').prepend('<p id="fail">Incorrect login information. Please try again</p>'); (missing " ' " after #formwrapper...) page 369 line 5......" if ($('#fail').length==0){".......<<<<works page 370 line 9....."if ($(!'#fail').length){".......,,,,,does NOT work

Note from the Author or Editor:
Page 368, step 7, line 5 two errors: 1. need ' after form wrapper $('#formwrapper') 2. the "continue to next line symbol" is incorrect, see step 6 on page 369 for correct symbol Page 369, step 10, line 6 missing ' after formwrappers $('#formwrapper') Page 370, step 11, line 7: change $('#formwrapper) to $('#content') Page 370, step 11, line 7 missing ' after formwrapper $('#formwrapper')

David  Jun 10, 2013  Aug 16, 2013
Printed
Page 370
Step 12

the last line of Step 12, "chapter 12" should be "chapter 11"

Barry  Nov 15, 2011  Dec 22, 2011
Printed
Page 370
Step 11

In lines 7 and 10 of Step 11, ('#formwrapper) should be, ('#formwrapper')

Note from the Author or Editor:
lines 7 and 10 are missing a closing ' mark. $('#formwrapper) should be $('#formwarpper')

Barry  Nov 15, 2011  Dec 22, 2011
Other Digital Version
370
Sample login.html file

This is an error in the login.html file from Chapter 11. Line 58 (or thereabouts) is missing the attribute id="login". <form method="get" action="login.php"> Should be: <form method="get" action="login.php" id="login">

Note from the Author or Editor:
--sending new tutorial files to O'Reilly--

David White  Dec 05, 2011  Jul 31, 2013
PDF
Page 371
Immediately beneath 2nd note

should be name/value pair, rather than name value/pair.

Sruli  Dec 07, 2011  Dec 22, 2011
Printed
Page 371
1st line

The first sentence on page 371 (below the note) is "You already learned how to create JSON back on page 370." However the first mention of JSON in the book was six lines before that sentence, and we didn't learn much in those six lines.

Note from the Author or Editor:
First sentence after NOTE at top of page: remove sentence "You already learned how to create JSON back on page 370."

Frank  Jan 15, 2013  Aug 16, 2013
Printed
Page 371
Next to last paragraph

The term "JSON" should be changed to "JSON object" or equivalent in this sentence: "When the web server responds to an Ajax request, it can return a string formatted like a JSON."

Note from the Author or Editor:
First sentence of second to last paragraph should end in "a string formatted like a JSON object."

jeffstraw  May 15, 2013  Aug 16, 2013
Printed
Page 373
Line 3, also the same line at the middle of the page

Line 3 begins "$.getJSON" but when the line is repeated at the middle of the page. there is a space after the "get": "$.get JSON" I doubt that both are correct.

Note from the Author or Editor:
middle code section remove space between $.get and JSON should be $.getJSON

Frank  Jan 15, 2013  Aug 16, 2013
Printed, PDF, ePub
Page 379
2nd paragraph under "Constructing the URL"

Duplicate ampersands in example URL: "http://api.flickr.com/services/feeds/groups_pool.gne?id=25053835@N03&&format=json"

Note from the Author or Editor:
Remove one of the & prior to format=json.

jeffstraw  May 10, 2013  Aug 16, 2013
PDF
Page 382
On line 29 or 30 of the code snippet

The items property is an array of object literals, and a closing bracket, ], was omitted between the closing braces of lines 29 and 30.

Note from the Author or Editor:
in the code on the page, add a new line 30 (between the current 29 and 30) so last three lines look like this: 29 } 30 ]; 31 }

Halyn  Dec 24, 2011  Feb 03, 2012
Printed, PDF
Page 385
Very bottom

In step 8, the first 3 bold lines should not be bolded. For step 8, only the '$('#photos').append(photoHTML);' line should be in bold.

Note from the Author or Editor:
In step 8, the first 3 bold lines should not be bolded. For step 8, only the '$('#photos').append(photoHTML);' line (which appears on page 386) should be in bold.

Joe Kneebone  Dec 18, 2011  Feb 03, 2012
Printed
Page 385
Step 7

The span tag is not closed in the code. The 3rd line of bold code should be: photoHTML += '<img src="' + photo.media.m + '"></a></span>; This should updated in steps 8 and 10 on page 386 too.

Anonymous  May 16, 2012  Jun 01, 2012
Printed
Page 387
Note after step 11

The first sentence indicates that the Flickr feed provides 20 images maximum. The second sentence indicates that you can retrieve more than 20. I think the second sentence should read "You can retrieve less than 20...." Change "more" to "less."

Note from the Author or Editor:
Note on page 387, second sentence should read: "You can't retrieve more than 20 from any one feed."

Anonymous  May 16, 2012  Jun 01, 2012
PDF
Page 389
step 2

I think that it should say: "So in addition to the <script> tag from step 1"- not step 2.

Sruli  Dec 08, 2011  Dec 22, 2011
Printed
Page 389
Step 4, 1st paragraph

The end of the text before the script starts should read "...--then add goMap(); :" Replace "gmap3()" with "goMap();"

Note from the Author or Editor:
First paragraph following step 4 point: change "then add gmap3();" to "then add goMap();"

Anonymous  May 16, 2012  Jun 01, 2012
Printed
Page 389
Second paragraph (after the code)

The first sentence should read -- "Just calling the goMap() function...." Replace "jmapgoMap()" with "goMap()"

Note from the Author or Editor:
Last paragraph on page 389, replace jmapgoMap() with goMap()

Anonymous  May 16, 2012  Jun 01, 2012
Printed
Page 397
GoMap Tutorial, step 2

<h1 class="shadowLine">Google Maps</h1> should just be <h1>Google Maps</h1> Or, the tutorial files could just be changed.

Note from the Author or Editor:
change <h1 class="shadowLine">Google Maps</h1> to <h1>Google Maps</h1>

Joe Kneebone  Dec 19, 2011  Feb 03, 2012
Printed
Page 397
First paragraph under "GoMap Tutorial"

It states: "You'll also add programming so that visitors can request driving directions". Where is it ???

Note from the Author or Editor:
That is a mistake -- we don't add that programming in the tutorial. That text should be removed.

Erik  May 11, 2012  Jun 01, 2012
PDF
Page 405
very bottom

line 2... line 3... line 4... should be: line 2... line 4... line 6...

Note from the Author or Editor:
page 405, last paragraph change "line 3" to "line 4" and "line 4" to "line 6"

Sruli  Dec 10, 2011  Dec 22, 2011
PDF
Page 406
towards the top

</div'; should be </div>;

Sruli  Dec 10, 2011  Dec 22, 2011
Printed
Page 409
.Events entry near the bottom of the page

There is a reference to Page 427. It should be page 421 (maybe also include page 177)

Note from the Author or Editor:
change "On page 427" to "On page 421"

Barry  Dec 08, 2011  Dec 22, 2011
PDF
Page 414
end of first paragraph

says that find.html is in the chapter 07 folder, but I found it in the chapter 13 folder.

Note from the Author or Editor:
page 414, last sentence of first paragraph change "in the chapter07 tutorial folder" to "in the chapter13 tutorial folder"

Sruli  Dec 10, 2011  Dec 22, 2011
Printed
Page 415
Note: at the top of the page

"See the previous page" maybe should be "See Page 407"

Barry  Dec 08, 2011  Dec 22, 2011
Printed
Page 416
3rd paragraph

"In line 4" should be "In line 3"

Barry  Dec 09, 2011  Dec 22, 2011
Printed
Page 433
Step 1

"Table 15-1" should be "Table 14-1"

Barry  Dec 07, 2011  Dec 22, 2011
Printed
Page 434
1st Paragraph after Step 4

"Table 15-2" should be "Table 14-2"

Barry  Dec 07, 2011  Dec 22, 2011
Printed
Page 434
FIrst sentence of step 3

The first sentence of step 3 states: To find any number of characters, you can use .*, which translates to "find one character (.) zero or more times(*)." The problem is that the whole point of the example is "to find the name of any GIF file in a string". But if the string has an error and does not include any word characters before the file extension ".gif", then the pattern will still match even though it is not a valid file name, and any code attempting to use the match results will fail. The fix is simple: replace "*" (0 or more occurrences) in the regex with "+" (one or more occurrences) so the complete regex is now "/\S+\.gif/i" (without the quotes). So now, the string "This file is .gif" will not match, but the string "This file is z.gif" will match. The text should be changed to reflect that situations like finding a file name require the "+" character whereas other string matches may not require it. The regex should also be changed in steps 4 and 5 on page 435 to use the corrected version.

Note from the Author or Editor:
Step 3 should be changed to: 3. Find at least one character before .gif. To find at least one character, you can use .+, which translates to "find one character (.) one or more times (+)." That regular expression matches all of the letters in any string. However, if you used that to create a regular expression like .+\.gif, you could end up matching more than just a file name. For example. if you have the string 'the file is logo.gif', the rebec .+\.gif will match the entire string (after all "the file is logo" matches the .+ regex). What you really want is just logo.gif. To do that use the \S character, which matches any non space character: \S+\.gif means "select one or more characters that are not a space, tab, carriage return or new line followed by .gif" So this will match logo.gif, and photo.gif. also code in step 4 should be /\S+\.gif/i and code line #2 in step 5 should be var gifRegex = /\S+\.gif/i; // the regular expression

Barry Gruber  Jan 04, 2014 
PDF
Page 439
Date- first line

For the sake of consistency, the author/editor may want to change 09/28/2008, to 09/28/2007.

Sruli  Dec 11, 2011  Dec 22, 2011
PDF
Page 439
fifth 'li' before end of page

[0123]? matches either 0,1,2 or 3 zero or more times ..... ? character means 'optional' in regexp,... zero or one time but not zero or more times.... regards

Note from the Author or Editor:
"[0123]? matches eaither 0, 1, 2, or 3 zero or more times." should read ""[0123]? matches eaither 0, 1, 2, or 3 zero or one time."

lionel  Dec 27, 2011  Feb 03, 2012
Printed
Page 440
Figure 14-4

In Figure 14-4 for Group 3 "\swww" should be "\bwww"

Barry  Dec 07, 2011  Dec 22, 2011
Printed
Page 444
Power User's Clinic Box

In Paragraph 2, all "10/27" should be "10/28"

Barry  Dec 07, 2011  Dec 22, 2011
Printed
Page 453
Very last sentence

You can read more about this method on page 450. To You can read more about this method on page 456.

Joe Kneebone  Dec 19, 2011  Feb 03, 2012
Printed
Page 468
Last Paragraph

"Table 14-1" should be "Table 15-1"

Note from the Author or Editor:
page 468, last paragraph, last sentence. Table 14-1 should be Table 15-1

Barry  Dec 08, 2011  Dec 22, 2011
Printed
Page 469
Second code example

Not one that actually affects the code, but, alert('You lose (but at least you have a great name'); To alert('You lose(but at least you have a great name'); Perhaps you should have been following your own advice when writing this? :D

Note from the Author or Editor:
change alert('You lose (but at least you have a great name'); To alert('You lose(but at least you have a great name)');

Joe  Dec 20, 2011  Feb 03, 2012
Printed
Page 473
3rd Paragraph

The phrase "which refers not to the HTML document itself" should be "which refers to the HTML document itself", i.e., remove the "not".

Note from the Author or Editor:
change "which refers not to the HTML document itself" to "which refers to the HTML document itself." remove the "not"

Lem3  May 13, 2013  Aug 16, 2013
Printed
Page 475
2nd Paragraph

References to "Figure 14-2" should be for "Figure 15-2"

Note from the Author or Editor:
Page 475: paragraph immediately after figure 15-2. Paragraph references Figure 14-2: should be Figure 15-2

Barry  Dec 08, 2011  Dec 22, 2011
Printed
Page 490
Step 1

It seems the "debugger.html" file is the corrected one, complete_debugger.html.

Note from the Author or Editor:
--we've uploaded new tutorial files to fix this problem--

Barry  Dec 11, 2011  Jul 31, 2013
Printed
Page 491
Step 4 Paragraph 2

On the second line, "1.6.2" should be, "1.6.3"

Note from the Author or Editor:
change jquery-1.6.2min.js to jquery-1.6.3.min.js

Barry  Dec 11, 2011  Dec 22, 2011
PDF
Page 493
step 13

I think that it should say 15-10 rather than 14-10

Sruli  Dec 12, 2011  Dec 22, 2011
Printed
Page 497
last paragraph

Google Doctype is now gone. Is there a viable replacement for it?

Note from the Author or Editor:
Change "Google Doctype (url)" to "WebPlatform.org (http://www.webplatform.org)"

John Pinto  Aug 10, 2012  Aug 16, 2013