- Create hidden tooltip element:
- Create JS scripts for showing/hiding tooltip:
function show()
{
var tooltip = document.getElementById('tooltip');
tooltip.style.top = event.clientY;
tooltip.style.left = event.clientX + 10;
tooltip.style.display = 'block';
}
function hide(){
var tooltip = document.getElementById('tooltip');
tooltip.style.display = 'none';
} - Set Javascript events for the chosen page element:
Element content
Friday, 29 May 2009
JS: Display tooltip over page element
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment