Files
conservatorio-tomadini/templates/tabulizer/js/xcell_bg_height.js
2024-12-17 17:34:10 +01:00

17 lines
571 B
JavaScript

function setXCellBackgroundHeight() {
jtQuery('.xcell').each(function(){
var el = jtQuery(this);
var padding_top = parseInt(el.css('padding-top'));
var padding_bottom = parseInt(el.css('padding-bottom'));
var parent_height = el.parent('td').height();
new_height = parent_height - padding_top - padding_bottom;
el.css("height", new_height + "px");
});
}
jtQuery(document).ready(function(){
setXCellBackgroundHeight();
});
jtQuery( window ).resize(function() {
setXCellBackgroundHeight();
});