The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
untitled Javascript Code
Posted by: TheBMan | December 18, 2010 @ 10:31am
Javascript Code
[
Download
]
function toolTip(id,message,toolTipEvent,e){ var x = 0; var y = 0; if (!e) var e = window.event; var x = 0; var y = 0; if (e.pageX || e.pageY) { x = e.pageX; y = e.pageY; } else if (e.clientX || e.clientY) { x = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; y = e.clientY + document.body.scrollTop + document.documentElement.scrollTop; } status='ID='+id+'x='+x+'y='+y; switch(message){ case 'AL': toolTipMessage = "This is a day that will be submitted as AL.<br/>THIS IS NOT A CONFIRMED ANNUAL LEAVE REQUEST!"; break; case 'RDO': toolTipMessage = "As a full-time employee, you are unable to alter your RDO's through a shift swap,<br/> nor will they be affected by an annual Leave request"; break; case 'mixed': toolTipMessage = "A day or range of days you have requested for AL fall on an RDO and will not be counted."; break; case 'blank': toolTipMessage = "This is a day that is neither an AL request, nor an RDO if you are a full-time employee"; break; default: toolTipMessage = "Go fuck yourself"; break; } if(toolTipEvent=='show'){ show(); } else { hide(); } function show(){ document.getElementById('toolTip').innerHTML=toolTipMessage; document.getElementById('toolTip').style.visibility=''; document.getElementById('toolTip').style.left=x+10; document.getElementById('toolTip').style.top=y-10; } function hide(){ document.getElementById('toolTip').innerHTML=''; document.getElementById('toolTip').style.visibility='hidden'; document.getElementById('toolTip').style.left=0; document.getElementById('toolTip').style.top=0; } }
Syntax Highlighting
[
Open in new window
]
Author Comments
none
Rating
4.48 / 8
64 Votes
http://codebin.yi.org/1018
page generated in 0.00 seconds