John Lindal![]()
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.
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info