jjamjatra (1) [Avatar] Offline
#1
Page 35 error:TypeError Object#<HTMLImageElement> has no method 'addClass'
In the Wrapped Set Lab, on page 35, both array indexing syntax and the get() method result in the error in the subject of this thread.

$('img[alt]')[0]
$('img[alt]').get(0)

both of the above fail the same way.

The HTML for DOM Sample fragment is:

<div>



The TypeError exception is on line 12 of file subpage.wrapped.set.html which is:

wrappedSet.addClass('wrappedElement');

This lab is using jquery-1.2.1

This is likely the error of this rookie but I don't see my mistake. Nothing in errata I could find.