Re: [jQuery] in 1.1.1, get(0) returns the document when it shouldn't be returning anything!

2007-01-23 Thread jgrucza
Well in my case I wasn't passing any context in, but if the same code applies to both cases, I'll take your word for it. Glad to see it has been fixed. Jennifer Klaus Hartl wrote: > > bander wrote: >>> But after upgrading to 1.1.1, I got an error saying focus() wasn't a >>> method. So I adde

Re: [jQuery] in 1.1.1, get(0) returns the document when it shouldn't be returning anything!

2007-01-23 Thread Klaus Hartl
bander wrote: >> But after upgrading to 1.1.1, I got an error saying focus() wasn't a >> method. So I added a little debugging alert, and apparently, >> $(".focus").get(0) is returning the document object! If I call >> $(".focus").size() it returns 0, but yet when I call .get(0) it's >> returning

Re: [jQuery] in 1.1.1, get(0) returns the document when it shouldn't be returning anything!

2007-01-23 Thread bander
Personally, I always use this form: var tempList = $(...); if (tempList.length) { // perform actions on tempList or tempList[0] } I've always run into trouble assuming that actions on an empty set will be ignored. (I agree that this should be fixed, but it's a decent workaround for the time be