Using PHP, I am returning a table with rows containing 3 columns each. The third column has an information icon that is hidden unless hovered over. Here's a snippet from the PHP code that generates this table:
$contoutput = $contoutput . '<tr><td>' . $xleft[$i] . '</td><td>' . $xright[$i] . '</td><td class="hiddensourceicon" onMouseOver="showicon(this);">' . findsource($xsource[$i]) . '</td></tr>';
The CSS for hiddensourceicon
is simple:
.hiddensourceicon { display: none; }
This way, the said icon doesn't display upon load. I am using JQuery to remove this class, thus "unhiding" the icon upon hover:
function showicon(row2show){ $(row2show).removeClass("hiddensourceicon"); }
But for some reason, the JQuery function refuses to trigger. What am I doing wrong?