Javascript Jquery Hover Popup HTML Box

I’m inheriting some really bad old js code. My goal is to try to make it at least work on all browsers so the application could be pushed.

The code is currently event handled, not using selectors (jQuery).

This is how a event is triggered:

<a ONMOUSEOVER=""popup('" & popup & "','lightgreen')""; ONMOUSEOUT='kill()' style='color:red'> info</a></b>

I know! What a disaster!

The html for the popups looks like this:

var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
"BGCOLOR="+bak+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
yyy=Yoffset;

The mouse position will have to be captured in order to show/offset the popup close to it, right or left depending.

There is a similar post which has the code, in case your wondering how bad code is:
JavaScript script doesn't work in Firefox

The functions are actually worse but really won’t go into that. Could somebody point me to a snippet of code anywhere which could help me get this out of the way?

newest questions tagged jquery – Stack Overflow

About Admin