I need to convert the style attribute of an HTML element to a JSON object with JavaScript / jQuery. How should I go about this?
Clarification:
Lets say I have <div style="font-size: 14px; text-align: center;"></div>, so I want a JSON object: {font-size: 14px, text-align: center}
Using the jquery-json plugin,
HTML
JavaScript
http://jsfiddle.net/mattball/aT77q/