-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.js
More file actions
52 lines (39 loc) · 1.24 KB
/
scripts.js
File metadata and controls
52 lines (39 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
$(function(){
function thisWidth(){
return $(this).width();
}
function thisHeight(){
return $(this).height();
}
$(".row1").height(function() {
return Math.max.apply(Math, $("ul").find("li").map(thisHeight));
});
other_cols = $('ul.table-row').first().find('li:not(.fixed)')
$("ul.table-row").each(function(){
the_lis = $(this).find('li');
the_lis.height(function(){
return Math.max.apply(Math, the_lis.map(thisHeight));
})
fixed_col = $('li.fixed');
fixed_col.css({
'margin-left': function(){
return -12+-1*Math.max.apply(Math, fixed_col.map(thisWidth));
}
});
fixed_col.width(function(){
return Math.max.apply(Math, fixed_col.map(thisWidth));
});
for (i=0;i<other_cols.length;i++){
$('ul.table-row').find('li:eq('+i+')').width(function(){
return Math.max.apply(Math, $('ul.table-row').find('li:eq('+i+')').map(thisWidth));
});
}
});
$('li').resizable()
$('.alt-table-container .table-spacer-col').width($('li.fixed').outerWidth())
var spacerWidth = 0;
$('.table-container ul.table-col.fixed').each(function(){
spacerWidth += $(this).outerWidth();
})
$('.table-container .table-spacer-col').css('width', spacerWidth);
});