MediaWiki:Gadget-GradientHeaders.js: Difference between revisions
From Elwiki
mNo edit summary |
mNo edit summary |
||
Line 7: | Line 7: | ||
var bgimage = th.css('background-image'); | var bgimage = th.css('background-image'); | ||
if(bgcolor != 'Rainbow' && bgimage != '' && bgimage != 'none'){ | if(bgcolor != 'Rainbow' && bgimage != '' && bgimage != 'none'){ | ||
console.log(bgcolor, bgimage); | |||
th.css('background-image', 'linear-gradient(to bottom, #eee, ' + bgcolor + ')'); | th.css('background-image', 'linear-gradient(to bottom, #eee, ' + bgcolor + ')'); | ||
} | } |
Revision as of 18:10, 4 June 2016
$('tr').each(function(){
var tr = $(this);
if(!tr.hasClass('rainbow')){
tr.children('th').each(function(){
var th = $(this);
var bgcolor = th.css('background-color');
var bgimage = th.css('background-image');
if(bgcolor != 'Rainbow' && bgimage != '' && bgimage != 'none'){
console.log(bgcolor, bgimage);
th.css('background-image', 'linear-gradient(to bottom, #eee, ' + bgcolor + ')');
}
});
}
});