MediaWiki:Gadget-GradientHeaders.js: Difference between revisions

From Elwiki
mNo edit summary
mNo edit summary
Line 5: Line 5:
             var th = $(this);
             var th = $(this);
             var bgcolor = th.css('background-color');
             var bgcolor = th.css('background-color');
             th.css('background-image', 'linear-gradient(to bottom, eee, ' + bgcolor + ')');
             th.css('background-image', 'linear-gradient(to bottom, #eee, ' + bgcolor + ')');
         });
         });
     }
     }
});
});

Revision as of 17:07, 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');
            th.css('background-image', 'linear-gradient(to bottom, #eee, ' + bgcolor + ')');
        });
    }
});