Quote:
Originally Posted by Sane
I solved it by wrapping the <tr></tr> in a tbody, and then manipulating the tbody's class.
|
Just tried the wrapping and it still behaves the same. I think this is happening because the mouseover event is not being propagated to the cells ancestors. I found a work around which is to get the parent of the cell an set its classname:
elm.parentNode.className = "highlight"
Quote:
Originally Posted by Sane
Oh, and your javascript can be substituted with something stabler, quicker, and more compatible: CSS. Unless you need to do more than alter the hover colour.
|
The reason I went with JS over CSS is because I find it some browsers don't all support the hover pseudo class for all elements especially IE.
Quote:
Originally Posted by Sane
Also, enumerating each tr tag in your javascript is odd. Why not directly reference the tag you're looking for?
|
Please explain further, do you mean give each tr a unique id? If so wouldn't this be more code than now.