I have a site that is heavily based on javascript, but I still want to let it easily modify CSS.
Take this example ... there is a div that has its opacity changed when you hover over jQuery, but I would like the designer to be able to choose the opacity value.
I was thinking of creating a block in css just to declare these constants, for example:
.constants_someid{
opacity: 0.5;
}
and then through jQuery I use this opacity like
var opacity = jQuery('css:constants_someid').attr('opacity');
I donโt know if this is a good way to make this declaration of constants, but thatโs what it came to my mind right now.
What do you guys think?
Thanks
Joe
source
share