Errata

jQuery Pocket Reference

Errata for jQuery Pocket Reference

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.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 15
para 2 ("The css() method ...")

Hyphenation.

The hyphenated and camel-cased forms of the example word,
"background-color" and "backgroundColor" both wound up straddling the end of the line, and were set as
"background-
color"
and
"background-
Color"

The hyphen in the first instance is part of the spelling, and in the second instance an indication of hyphenation when breaking a single word; the unfortunate result is a confusing (if technically correct) presentation, which obfuscates the point it is intended to illustrate.

This is also inconsistent with the usage elsewhere in the book, in which camel-cased *keywords* are broken before an internal capitalized letter without adding a hyphen -- for example, earlier on the same page.

I have seen dictionaries which address the problem by having a special symbol (an oblique equals-sign) for end-of-line hyphenation, distinct from the hyphen glyph used as part of the normal spelling of a word.

Jacob B. Gross  Feb 07, 2011 
Printed Page 52
penultimate line

false()

should be

false

Jacob B. Gross  Feb 07, 2011 
PDF Page 54
1st code block, 3rd line

(PDF generated from Safari Books Online)

In the Javascript object passed to animate(), the font-size property needs to be a string, ie

{"font-size": 10} instead of {font-size: 10}

Otherwise, the Javascript is not valid.

This is actually explained for "margin-left" on page 55, 1st paragraph.

Max Sadrieh  Sep 17, 2012 
Printed Page 56
3rd para. (The queue property...)

"The queue property ... specifies whether the animation should be queued, or whether it should be deferred until..."

The intent of the conjunction "or" is unclear. Does is separate opposite choices (those for the values "true" and "false"), or alternative ways of describing the same choice ("true"), leaving the effect of of the alternative ("false") unstated. I understand it is used in latter sense. In any event the wording needs to be reworked.

Jacob B. Gross  Feb 07, 2011 
Printed Page 94
1st line

The jQuery selector as printed in the book is:

p:nth-child(3n + 1):text(JavaScript):not(:has(a))

The :text selector in the book should be replaced with the :contains selector. That is, the line should read:

p:nth-child(3n + 1):contains(JavaScript):not(:has(a))

As printed in the book, the selector is syntactically incorrect (:text does not take a parameter) and semantically incorrect. :text looks for <input type='text'> elements when what we want is to find <p> elements that contain the word "JavaScript".

Milton Kuo  Oct 02, 2021