Well, lets see a markup as an example.
<div class="_round_5">Some text</div>
<div class="_brTop_5">Another Text</div>
My idea is to collect all the unique class name in a page that begin with a _ and post them to a different page, which will return me with a file that contains a generated CSS style based on those class name.
Now, How to collect all the unique class names that begin with a “_” or some other prefix also? The list might be an array or json. But I prefer json.
Try: http://jsfiddle.net/54kzu/3/
It correctly handles multiple classes, as you requested in the comments.