Remove background color/images for all elements with jQuery

css, html, jquery

Solution

Real simple with jQuery...

$('*').css('background', 'transparent');

jsFiddle.

If you didn't have jQuery at your disposal...

var allElements = document.getElementsByTagName("*");

for (var i = 0, length = allElements.length; i < length; i++) {
    allElements[i].style.background = "none";
}

jsFiddle.

Problem

Is there a simple way to use jQuery to remove all background styles on a page? Specifically, need to remove background color and images.

Original source

Related problems