How do I get a CSS property from the style attribute of an HTML element (and ignore the stylesheet/computed properties)?
E.g:
<div style="float:left"></div>
function getStyle(element, name) { ... }
getStyle(element, 'float') === 'left';
getStyle(element, 'font-weight') === null;
I don’t mind either raw JS or jQuery.
If you want pure JS, This example: