ElEditors, Interface administrators, Administrators
85,546
edits
mNo edit summary |
mNo edit summary |
||
Line 282: | Line 282: | ||
}); | }); | ||
/* Deal with rainbow rows */ | /* Deal with rainbow rows */ | ||
$('tr.rainbow').each(function(){ | |||
var | var rb_TotalWidth = parseInt($(this).width()); | ||
var | var rb_StepLen = rb_TotalWidth / 10; | ||
$(this).children('td | var rb_LBorder = 0, rb_RBorder, rb_CurPoint = 0; | ||
var rb_HSL, rb_CellWidth; | |||
$(this).children('th, td').each(function(){ | |||
rb_HSL = []; | |||
rb_CellWidth = parseInt($(this).outerWidth(true)); | |||
rb_RBorder = rb_LBorder + rb_CellWidth; | |||
rb_HSL.push('hsl(' + (rb_LBorder / rb_TotalWidth * 360).toString() + ',100%,50%) 0%'); | |||
while(rb_CurPoint < rb_RBorder){ | |||
rb_HSL.push('hsl(' + (rb_CurPoint / rb_TotalWidth * 360).toString() + ',100%,50%) ' + ((rb_CurPoint - rb_LBorder) / rb_CellWidth * 100).toString() + '%'); | |||
rb_CurPoint += rb_StepLen; | |||
} | |||
rb_HSL.push('hsl(' + (rb_RBorder / rb_TotalWidth * 360).toString() + ',100%,50%) 100%'); | |||
$(this).css({ | $(this).css({ | ||
'background-image': | 'background-image': 'linear-gradient(to right,' + rb_HSL.join(',') + ')' | ||
}); | }); | ||
rb_LBorder = rb_RBorder; | |||
}); | }); | ||
}); | }); | ||
/* | /* | ||
$('table.odd-stripe > tbody > tr:has(td):').css('background-color', function(){ | $('table.odd-stripe > tbody > tr:has(td):').css('background-color', function(){ | ||
Line 301: | Line 310: | ||
*/ | */ | ||
}); | }); | ||