addtd(tr, "gd", teams[i].gd.toString().replace(/-/, '−'));
addtd(tr, "pts", teams[i].pts);
- tr.style = "-webkit-animation: fade-in 1.0s ease; -webkit-animation-delay: " + 0.25 * (row_num++) + "s; -webkit-animation-fill-mode: both;";
carousel.appendChild(tr);
}
if (tiebreakers.length > 0) {
var tie_tr = document.createElement("tr");
tie_tr.className = "footer";
- tie_tr.style = "-webkit-animation: fade-in 2.0s ease; -webkit-animation-delay: " + 0.25 * (row_num++) + "s; -webkit-animation-fill-mode: both;";
var td = document.createElement("td");
td.appendChild(document.createTextNode("Tiebreaks applied: " + tiebreakers.join(', ')));
td.setAttribute("colspan", "5");
var footer_tr = document.createElement("tr");
footer_tr.className = "footer";
- footer_tr.style = "-webkit-animation: fade-in 2.0s ease; -webkit-animation-delay: " + 0.25 * (row_num++) + "s; -webkit-animation-fill-mode: both;";
var td = document.createElement("td");
td.appendChild(document.createTextNode("www.trondheimfrisbeeklubb.no | #trøndisk"));
td.setAttribute("colspan", "5");
footer_tr.appendChild(td);
carousel.appendChild(footer_tr);
+ fade_in_rows(carousel);
+
carousel.style.display = 'table';
};
+var fade_in_rows = function(table)
+{
+ var trs = table.getElementsByTagName("tr");
+ for (var i = 1; i < trs.length; ++i) { // The header already has its own fade-in.
+ if (trs[i].className === "footer") {
+ trs[i].style = "-webkit-animation: fade-in 1.0s ease; -webkit-animation-delay: " + (0.25 * i) + "s; -webkit-animation-fill-mode: both;";
+ } else {
+ trs[i].style = "-webkit-animation: fade-in 2.0s ease; -webkit-animation-delay: " + (0.25 * i) + "s; -webkit-animation-fill-mode: both;";
+ }
+ }
+};
+
// Stream schedule
var display_stream_schedule = function(response, group_name) {
var teams = parse_teams_from_spreadsheet(response);
addth(tr, "streamtime", games[i].streamtime);
}
- tr.style = "-webkit-animation: fade-in 1.0s ease; -webkit-animation-delay: " + 0.25 * (row_num++) + "s; -webkit-animation-fill-mode: both;";
+ row_num++;
carousel.appendChild(tr);
}
+ fade_in_rows(carousel);
+
carousel.style.display = 'table';
};