Advertisement
CaptainLepidus

Tooltips

Apr 12th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.62 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. hide()
  5. {
  6. document.getElementById('trail').style.visibility="hidden";
  7. }
  8. show()
  9. {
  10. document.getElementById('trail').style.visibility="visible";
  11. }
  12. function cursor(event)
  13. {
  14. document.getElementById('trail').style.position="absolute";
  15. document.getElementById('trail').style.left=event.clientX+10;
  16. document.getElementById('trail').style.top=event.clientY;
  17. }
  18. </script>
  19. </head>
  20.  
  21. <body onmousemove="cursor(event)" onmouseover="show()" onmouseout="hide()">
  22. <h1>Move the cursor over this page</h1>
  23. <span id="trail" style="visibility:hidden">Cursor Text</span>
  24. </body>
  25.  
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement