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
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
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