The title pretty much says it all.
Using jQuery, I need to select all elements that do not have a background color or image defined, and apply at least a white background to it.
Thanks!
The title pretty much says it all.
Using jQuery, I need to select all elements that do not have a background color or image defined, and apply at least a white background to it.
Thanks!
If you know which specific elements you're looking for you could do something like this:
var els = $('div');
els.each(function(idx, el){
if ($(el).css('background-color') == '' || $(el).css('background-image') == '')
{
$(el).addClass('white-background');
}
});