Get computed styles of dom elements
Download the production version or the development version.
Place it in your file
<script src="computed-style.min.js"></script>
Returns the native Css declaration of the browser. It is a collection of all the computed styles of the element.
var styles = computedStyle.getAll(element);
Returns the computed value for given style name
var marginTop = computedStyle.get(element, 'marginTop');
Gets rid of 'px' values returning a floating nuber or 0
var number = computedStyle.toFloat('120px');
Gets the floating number value of the given style name of an element.
var number = computedStyle.getFloat(element, 'marginTop');