views:

160

answers:

1

Accessing an html element's current style using Element.currentStyle only exists in IE. Is there any easy workaround for Safari or other non-IE browsers?

+1  A: 

For Safari I can get the current style using getComputedStyle like this:

window.getComputedStyle(element, null).width;

I found this here.

rosscj2533