I want to set CSS properties by a variable: e.g. {background: red; }
My code has a mistake, it does not work: js fiddle
js
var Key = 'background';
var Value = 'yellow';
$('.test').css({
Key: Value
});