The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 50 more by this user. Created: 12/8/09
Last CDN Push: 05/16/12
Build Tag: gallery-2012.05.16-20-37
Project: YUI 3
License: YUI BSD
YUI Version: 3.5.1
Free for use.
This extension to Y.Node provides useful functions for computing dimensions that are often needed in JavaScript.
Example uses of the functions provided by this add-on.
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.05.16-20-37'
}).use('gallery-dimensions', function(Y)
{
alert('2em = '+Y.Node.emToPx(2)+'px');
var node = Y.one('#my-div');
alert('my-div has top margin = '+node.parseDimensionStyle('margin-top')+'px'); // works even if style is in em
});
No forum posts for this module.
All code on this site is licensed under the BSD License unless stated otherwise.