Is there a way to achieve CSS variable-like functionality with jQuery? For example, creating reusable CSS attributes in jQuery instead of using SASS variables. Imagine if I could define a variable for the color black like this:
I want to make a variable that I can reuse for the color black
var black = .css('color','#000');
var white = .css('color','#FFF');
Of course, the syntax above is incorrect, but you get the idea. Then later on, I could apply this variable like so:
$('#myelement').css(black);
Is it feasible to achieve something like this in jQuery?