Newb doesn't understand why this JS works in FF, etc but not all IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neil Snape
    New Member
    • Sep 2010
    • 1

    #1

    Newb doesn't understand why this JS works in FF, etc but not all IE

    Hi. I was happy when this little rollover effect was working on my MAcs all browsers. It is also working on all Windows Chrome, FF, Opera, Safari too, but only IE6. Funny I thought IE6 was the buggy Windows browser.

    So the effect is to highlight spans in a list of non congruent Client Names
    while hovering on the category links on the left div.

    On IE8,7, 5 all are hiding allthe Client NAmes div. on hover

    Here is the actual page:

    http://corporate.fr/ce/clients.html

    Code:
     <script type="text/javascript">
    var category = document.getElementById('clientListNavBar');
    category.onmouseover = function (e) {
        e = e || window.event;
        var targ = e.target || e.srcElement;
        if (targ.nodeType === 3) {
            targ = targ.parentNode;
        }
        if (targ.nodeType === 1 && targ.nodeName === 'A') {
            document.getElementById('clientList').className = targ.href.split('#')[1];
        }
        return false;
    }
    category.onmouseout = function (e) {
        document.getElementById('clientList').className = '';
    }
    </script>

    Should I past the inline styles that are show / hide?
Working...