JavaScript Tooltip
Tooltip In JavaScript....! Hello readers this code helps you to set tooltip in any element to show some text in a popup. Although there is a feature supported by all the browsers to show tooltip by adding title attribute, but limitation is that you cannot use line breaks or background or foreground colors for title attribute. Below is the simple code to create tooltips using javascript. All you have to do is, just copy and paste the code and run. Code is Browser compatible. <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head > < title > Tooltip In Javascript </ title > < script type ="text/javascript" language ="javascript"> function showhideTooltip(opt, ctrl) { ...