And currently it's also the only way to get an empty jQuery object, as an empty selector will return 'document'.
I thought that the plus sign would always concatenate if it's used after a string. Just tested it and I can't make it evaluate as NaN, only with "string"+(+var). Are you missing something in that code? You can always add a check: if (!this.length) alert('I failed, I'm empty!!') On Nov 4, 6:47 pm, Mike Alsup <[EMAIL PROTECTED]> wrote: > > Is there some way to tell jQuery to actually throw errors instead of > > failing silently? > > It's not a failure to run a query and find nothing - that's a > perfectly valid use case.