[jQuery] Re: Each function gives errors in IE6

2009-09-25 Thread KeeganWatkins
hey Shane, Nick's comments above simply reinforce the need for explicit variable declaration. ignoring the var keyword, even when picking names that don't collide with properties of the window object, is a dangerous practice. it leads to hard-to-spot bugs, scope issues, and a whole mess of other

[jQuery] Re: Each function gives errors in IE6

2009-09-24 Thread Shane Riley
Weird double post. Found the issue. For some reason declaring the variable worked. So I changed it to: var top = (parseInt($(this).height()) / 2) - 6; On Sep 24, 7:31 am, Shane Riley shanerileydoti...@gmail.com wrote: I've got a simple each function that finds every subnav and assigns it a

[jQuery] Re: Each function gives errors in IE6

2009-09-24 Thread Nick Fitzsimons
2009/9/24 Shane Riley shanerileydoti...@gmail.com: Weird double post. Found the issue. For some reason declaring the variable worked. So I changed it to: var  top = (parseInt($(this).height()) / 2) - 6; That's because top is already defined as a synonym for the top-level window object, and