Difference between revisions of "Msc1G2:Group"

From uf
Jump to: navigation, search
(TUD 2)
(TUD 2)
Line 30: Line 30:
 
<br>
 
<br>
  
<span style="background-color: #FFFF00">Yellow text.</span>
+
 
 +
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

Banner1.png


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(){
   }