I want to increase height of an element by X pixels by writing a YUI3 script.
Whats the best way ?
if I use 'Node' module and read the height as node.getStyle("height");
The results of FF3 shows a string "100px" where as for IE8 its just blank. :(
Please help.
node.getStyle('height') only returns a value when you have a value set in the style of the node. To get the height of a node with out a style set use node.getComputedStyle('height') or node.get('clientHeight').
If you have overflow set, you can use node.get('scrollHeight') to get the full height of the content.
To update the height of the node, use setStyle('height', value)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With