Is it possible to set CSS properties using a variable, such as {background: red; }?
I tried implementing the code but encountered an error. Here is the link to the js fiddle for reference: js fiddle
Javascript
var Key = 'background';
var Value = 'yellow';
$('.test').css({
Key: Value
});