[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread Ricardo Tomasi
jQuery should be doing that by default, line 733 of core.js: var val, props = { position: "absolute", visibility: "hidden", display:"block" } if ( jQuery(elem).is(":visible") ) getWH(); else jQuery.swap( elem, props, getWH ); //apply 'props' briefly to get the correct values Could you p

[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread rob303
Hi Tommy, Many thanks. That's exactly what I came up with over night. $(this).next().css('display', 'block'); var h = $(this).next().height(); $(this).next().hide(); $(this).addClass('accordion_selected').next().height(h).slideDown ({duration: 700, easing: 'easeInOutQuad'}); Gives me the corre

[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-31 Thread omtay38
I know its probably not the best solution, but what if you showed the div just long enough to get the height, hid it again and then slid it down. You could prevent the div from actually showing by giving it something like .css("left","-1px") before using .show(). Just a thought. Tommy On Ja

[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-30 Thread rob303
Oh, one other thing. If I call .css('display', 'block') on the element before using height() FF gives me the correct value of 240px. Obviously, that breaks the accordion because I want the element hidden! /me scratches head ... Rob. On Jan 30, 7:57 pm, rob303 wrote: > Thanks for the reply Eri

[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-30 Thread rob303
Thanks for the reply Eric. But what have different box models got to do with it? I'm not setting any border or padding properties on my hidden div that would effect the height. And the difference between the two browsers is huge. IE says 240px and FF says 160px. I certainly don't have 80px wor

[jQuery] Re: Getting the height of a hidden div in Firefox

2009-01-30 Thread Eric Garside
Different box models. I'd read up more on the difference between the IE/FF box models to point you in the right direction. I'd give you a quick tutorial, but I get out at 3 on Fridays! :D On Jan 30, 1:52 pm, rob303 wrote: > Hi, > > I've been working on this for days.  The chaps on IRC couldn't f