All pastes #476484 Raw Edit

Something

public text v1 · immutable
·published 2007-05-08 03:14 UTC
rendered paste body
attachHoverAndFocus = function ()
{
    var woink = document.getElementsByTagName ("tr");
    for (var j = 0; j < woink.length; j++)
    {
        woink[j].onmouseover = function ()
        {
            this.className += ' hover';
        }
        woink[j].onclick = function ()
        {
            if (this.className.match('highlight'))
            {
                this.className = this.className.replace (' highlight', '');
            }
            else
            {
                this.className += ' highlight';
            }
        }
        woink[j].onmouseout = function ()
        {
            this.className = this.className.replace (' hover', '');
        }
    }
}
if (window.attachEvent) window.attachEvent('onload', attachHoverAndFocus);