Is there a way to highlight two rows simultaneously in a table when hovering over them?
I have achieved highlighting one row at a time using the code below:
<tr onmouseover="this.style.backgroundColor='#aaaaaa';" onmouseout="this.style.backgroundColor='#bbbbbb';">
The challenge is that my data is displayed in pairs, such as Rows 1 and 2, 3 and 4. I am looking for a solution that allows me to highlight both rows in each pair together when mousing over either of them. For example, when hovering over Row 1 or Row 2, both should be highlighted.
<tr><td>Row1</td></tr>
<tr><td>Row2</td></tr>
<tr><td>Row3</td></tr>
<tr><td>Row4</td></tr>