Extend Object with method that handles CSS values in javascript

If you are working with CSS and need to for instance add or subtract a value to a CSS value like “15px” or “3em” this method “getCSSValueAndUnit()” will come in handy. Simply add the code somewhere in the top to extend the “Object” object.   The method is used as follows: "10px".getCSSValueAndUnit(); which will return Continue reading