Possible Duplicate:
Can I fetch the value of a non-standard CSS property via Javascript?
How can I use jquery to retrieve all elements with a made-up or non-standard CSS attribute? For example, if the attribute is “emotion” and its value “happy”, how could I traverse the dom and retrieve the element with said attribute, and if necessary, it’s value?
HTML…
<div class="book">
</div>
CSS..
.book {
emotion:happy;
}
Javascript/jquery query to find book by it having the emotion attribute.
???
Thank you!
A workaround someone mentioned to me in person is to use a CSS parser, such as: http://glazman.org/JSCSSP/index.html