JSFiddle - React, Tailwind, and code Playground
JavaScript
var bod = $("body"),
bods = bod[0].style;
console.log(
bods.background == '',
bods.backgroundImage == '',
bods.backgroundColor == ''
);
console.log(
bod.css('background'), '|',
bod.css('backgroundImage'), '|',
bod.css('backgroundColor')
);
function isBGDefined(ele){
var img = $(ele).css('backgroundImage'),
col = $(ele).css('backgroundColor');
return img != 'none' || (col != 'rgba(0, 0, 0, 0)' && col != 'transparent');
};
console.log(isBGDefined('body'));