[jQuery] variable scope bug in Firefox only?

[jQuery] variable scope bug in Firefox only?


I'm experiencing an issue in Firefox 3 where, if a variable is
declared locally, it doesn't return expected results. I've tried the
same thing in IE7 and Chrome, I don't experience the bug in those
browsers.
My particular example is as follows:
var children = $("ul.cat_container > li.column:not(.pinned):first");
if (children.length > 0) {
...
} else {
...
}
In *Firefox only*, children.length will never be greater than 0,
unless children is declared globally (without 'var').
Has anyone else run up against this? Is this a Firefox issue, or a
jquery issue? (Or potentially a problem with my code? In which case,
why would I have different behavior in only one browser...)