Monday, 10 August 2015

How to check div display style

As sdleihssirhc says below, if the element's display is being inherited or being specified by a CSS rule, you'll need to get its computed style:


console.log(element.currentStyle ? element.currentStyle.display :
                          getComputedStyle(element, null).display);

No comments:

Post a Comment