Difference between revisions of "Msc1G2:Group"
From uf
(→TUD 2) |
(→TUD 2) |
||
Line 30: | Line 30: | ||
<br> | <br> | ||
− | + | ||
+ | function addEvent( obj, type, fn ) { | ||
+ | |||
+ | if ( obj.attachEvent ) { | ||
+ | obj['e'+type+fn] = fn; | ||
+ | obj[type+fn] = function(){obj['e'+type+fn] ( window.event );} | ||
+ | obj.attachEvent( 'on'+type, obj[type+fn] ); | ||
+ | } else | ||
+ | obj.addEventListener(type, fn, false); | ||
+ | } | ||
+ | |||
+ | function setUpFieldEvents(){ | ||
+ | var stripeTables = document.getElementsByClassName("stripe_table"); | ||
+ | var tableBodies = stripeTables.tBodies; | ||
+ | |||
+ | addEvent(tableBodies, "mouseover", hoverHighlight); | ||
+ | addEvent(tableBodies, "mouseout", undoHighlight); | ||
+ | } | ||
+ | |||
+ | function hoverHighlight(){ | ||
+ | var stripeTables = document.getElementsByClassName("stripe_table"); | ||
+ | var tableBodies = stripeTables.tBodies; | ||
+ | var tableData = tableBodies.getElementsByTagName("td"); | ||
+ | } | ||
+ | |||
+ | function undoHighlight(){ | ||
+ | |||
+ | } |
Revision as of 22:56, 1 November 2017
TUD 2
Hidde Manders - Dafne Swank - Mary Ann Berendson - Arav Kumar - Szymon Lapaj - Koen Martens
function addEvent( obj, type, fn ) {
if ( obj.attachEvent ) { obj['e'+type+fn] = fn; obj[type+fn] = function(){obj['e'+type+fn] ( window.event );} obj.attachEvent( 'on'+type, obj[type+fn] ); } else obj.addEventListener(type, fn, false); }
function setUpFieldEvents(){ var stripeTables = document.getElementsByClassName("stripe_table"); var tableBodies = stripeTables.tBodies;
addEvent(tableBodies, "mouseover", hoverHighlight); addEvent(tableBodies, "mouseout", undoHighlight); }
function hoverHighlight(){ var stripeTables = document.getElementsByClassName("stripe_table"); var tableBodies = stripeTables.tBodies; var tableData = tableBodies.getElementsByTagName("td"); }
function undoHighlight(){
}