Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
window.onload = function() {
var table = document.getElementsByTagName('table')[0];
new Fadenkreuz(table);
}
function Fadenkreuz(table) {
var td = table.getElementsByTagName('td');
var over_color = 'red';
var complete_row = true;
for(var i = 0; i < td.length; i++)
td[i].onmouseover = td[i].onmouseout = trigger;
function trigger(e) {
if(!e) e = window.event;
var obj = e.target || e.srcElement;
e.type == 'mouseout'
?
colorToCol(obj, '')
:
colorToCol(obj, over_color)
;
}
function colorToCol(o, clr) {
var r = o.parentNode;
while(r && r.tagName.toLowerCase() != 'tr') r = r.parentNode;
var i = 0;
var akt_col = 0;
var cell;
for(var i = 0; cell = r.cells[i]; i++) {
cell.style.backgroundColor = clr;
if( cell == o) {
akt_col = i;
if(!complete_row) break;
}
}
colorToRow(o, akt_col, clr);
}
function colorToRow(o, col, clr) {
var t = o.parentNode;
while(t && t.tagName.toLowerCase() != 'table') t = t.parentNode;
var row;
for(var i = 0; row = t.rows[i]; i++) {
row.cells[col].style.backgroundColor = clr;
if(!complete_row && row.cells[col] == o) break;
}
}
}