So I am looking for a jQuery Plugin or a method using javascript in general where I can obtain CSS properties from a string without using a lot of If else statements I have to write. The string comes from a user input like a Text area. Example:
var string = "#hello{border:1px #000 solid;background-color:#FFF;}";
So basically I want to be able to identify ID's and Classes from a string and their properties. So in this case that there is an ID called Hello and that it has a 1px border and a background color of #FFF (white). The info will be then be added to an object asnd pushed into an array. Is there a plugin or a way I can do this? There will also be multiple in each string. I know this might seem a little confusing. Thanks!
echothe recieved data directly.