I am trying to reduce my onmouseover event listeners in my table (in which I highlight lines on hover). I want to do this by associating an event listener with the whole table, and not with each <tr> (as I have now). The reason is that IE responds very slowly, and the only answer I found was to reduce the number of event listeners.
Code example:
<table id="myTable"> <tr> <td>Somedata</td> </tr> <tr> <td>Somedata 2</td> </tr> <tr> <td>Somedata 3</td> </tr> </table>
code>
In this case, if I hang over the second <tr>, I understand that the onmouseover event is bubbling from tr to the table.
How can I find out in jQuery $ ('# myTable'). mouseover event that tr hung and changed its css class?
Change The idea for this comes from this SO question (but unfortunately there is no source code in the answer): Speeding up several OnMouseOver events in IE
source share