I want to defined a variable/parameter in CSS and access it by javascript. What is the best way of doing this?
One option I thought of would be to place a cutsom attribute on the body
element, then access that attribute via jQuery.
A little more info: I'm defining colour sets in CSS. I've created a function with RaphaelJS to draw a gradient background on the page. I want this function to use a highlight colour (which is not used elsewhere on the DOM) which will be defined in the CSS along with the other colour elements.
Thanks