I get the same error.
On May 4, 9:51 pm, "Jordon Bedwell" <jor...@envygeeks.com> wrote: > Try: > > $(this).find('img').attr({'src':img[n][0],'alt':img[n][1]}); > > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > Behalf Of introvert > Sent: Monday, May 04, 2009 2:38 PM > To: jQuery (English) > Subject: [jQuery] jquery object and functions > > Hello. > > I'm having problems with the following code: > > var img = []; > //.... > var o = this.find('img'); > o.attr('src', img[n][0]).attr('alt', img[n][1]); > > The error I get is: > o.attr("src", img[n][0]).attr is not a function > > What am I doing wrong? > > Many thanks in advance!