I am having an issue with currentStyle which I have read is the fix before IE9 for getComputedStyle support.
I recently made this other thread regarding getting a reference to the top level LI list of a multi level navigation menu:
Selecting <li> child node but not grandchildren with vanilla JavaScript
Now I need to be able to measure the width or height of the LI's I am not able to reference with the help I received. It works, but not below IE9.
Here is what I've tried for getting the width:
this.w =function( elm ){
var s = (window.getComputedStyle) ? window.getComputedStyle(elm, "") : elm.currentStyle;
return parseInt(s.width);
}
the width comes back as NaN
SCRIPT5007: Unable to get property 'innerHTML' of undefined or null reference
I really appreciate everyone's help