Re: [jQuery] Dimensions plugin -- width and height
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Klaus Hartl Subject: Re: [jQuery] Dimensions plugin -- width and height PS: ...unless I'm not totally confused again. -- Klaus - If you're confused we're all screwed then... -ALEX ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
Klaus Hartl schrieb: > Jörn Zaefferer schrieb: > >> Dave Methvin schrieb: >> The core .height() and .width() methods are deprecated in 1.1. >>> Sho 'nuff, I missed that. In that case it makes sense to remove it from >>> dimensions.js eventually. >>> >>> >> Could someone please explain the difference between. >> >> 1.0.4 height()/width() >> 1.0.4 css("height/width") >> 1.1 css("height/width") >> dimension's height()/width() >> >> What do I need to compute width/height of an invisible element? >> >> > > > 1.0.4 height()/width() > returns an integer value (via clientHeight/offsetHeight), e.g. 110 > > > 1.0.4 css("height/width") > returns a string (via getComputedStyle), e.g. "110px" > > > 1.1 css("height/width") > same as 1.0.4 > > > dimension's height()/width() > with the latest additions from Brandon same as 1.04 height()/width() > > > What do I need to compute width/height of an invisible element? > height()/width() from latest dimensions plugin or $.css(elem, > 'height')/$.css(elem, 'width') - $(elem).css('height') will return NaN. > Ok, thanks for the clarification. -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
Jörn Zaefferer schrieb: > Dave Methvin schrieb: >>> The core .height() and .width() methods are deprecated in 1.1. >>> >> Sho 'nuff, I missed that. In that case it makes sense to remove it from >> dimensions.js eventually. >> > Could someone please explain the difference between. > > 1.0.4 height()/width() > 1.0.4 css("height/width") > 1.1 css("height/width") > dimension's height()/width() > > What do I need to compute width/height of an invisible element? > > 1.0.4 height()/width() returns an integer value (via clientHeight/offsetHeight), e.g. 110 > 1.0.4 css("height/width") returns a string (via getComputedStyle), e.g. "110px" > 1.1 css("height/width") same as 1.0.4 > dimension's height()/width() with the latest additions from Brandon same as 1.04 height()/width() > What do I need to compute width/height of an invisible element? height()/width() from latest dimensions plugin or $.css(elem, 'height')/$.css(elem, 'width') - $(elem).css('height') will return NaN. PS: ...unless I'm not totally confused again. -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
Dave Methvin schrieb: >> The core .height() and .width() methods are deprecated in 1.1. >> > > Sho 'nuff, I missed that. In that case it makes sense to remove it from > dimensions.js eventually. > Could someone please explain the difference between. 1.0.4 height()/width() 1.0.4 css("height/width") 1.1 css("height/width") dimension's height()/width() What do I need to compute width/height of an invisible element? -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
> The core .height() and .width() methods are deprecated in 1.1. Sho 'nuff, I missed that. In that case it makes sense to remove it from dimensions.js eventually. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
On 1/9/07, Dave Methvin <[EMAIL PROTECTED]> wrote: > > > I have left some code in the .height() and .width() methods > > to take a value to set the height or width. This behavior will > > not be documented and is to be deprecated in 1.1 but I have > > left it in for backwards compatibility. Do not rely on this > > behavior because it will be removed in the future. > > The core .height() and .width() methods are also setters though. If that's > deprecated then we're back to dimensions.js having different behavior than > the core methods it replaces. Or are the core methods losing their setter > ability too? The core .height() and .width() methods are deprecated in 1.1. The added code is so that the methods are backwards compatible with previous versions of jQuery that use the .height() and .width() methods as setters. The setter part of the .height() and .width() methods in dimensions will eventually be removed. -- Brandon Aaron ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
Re: [jQuery] Dimensions plugin -- width and height
> I have left some code in the .height() and .width() methods > to take a value to set the height or width. This behavior will > not be documented and is to be deprecated in 1.1 but I have > left it in for backwards compatibility. Do not rely on this > behavior because it will be removed in the future. The core .height() and .width() methods are also setters though. If that's deprecated then we're back to dimensions.js having different behavior than the core methods it replaces. Or are the core methods losing their setter ability too? ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/