Trying to figure out onmouseover function
Hi,
I'm trying to create a function to show a custom message as a tooltip when a user hovers over a table row. My tr tag looks like this
- <tr onmouseover="showToolTip('message');">
The javascript function looks like this:
- function showToolTip(message) {
if (jQuery) {
// jQuery is loaded
alert('loaded');
$(this).tooltip(message);
} else {
// jQuery is not loaded
alert(message);
}
}
jQuery seems to be loaded correctly, as I get the alert. I don't get the tooltip, however.
What I'm trying to do, in case this is totally retarded and impossible to see, is to hover a tooltip over the clicked row instead of passing it in as a variable.
Anyone able to spot the error and give me a hand fixing it?
Cheers!