Advertisement
Guest User

Untitled

a guest
Sep 11th, 2011
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. <html>
  2. <head>
  3. <style>
  4.  
  5. #tooltip-bubble {
  6. position: relative;
  7. width: 300px;
  8. border: 1px solid #000;
  9. background-color: #fff;
  10. color: #000;
  11. padding: 10px;
  12. font-family: Verdana;
  13. margin-bottom: 10px;
  14. margin-left: 50px;
  15. }
  16. </style>
  17. <script>
  18. var timer_id;
  19. var psm = "Test";
  20. var psm2 = "Test 2";
  21.  
  22. function update_div ()
  23. {
  24. div = document.getElementById ("tooltip");
  25.  
  26. div.innerHTML = "<div id='tooltip-bubble'><img src='http://www.tecnologiadiaria.com/imagenes/2009/04/msn-icon.png' width='16' height='16' /> <b>email@live.com</b><br /><a href='#' onclick='change_psm(1)'><i>" + psm +"</i></a><br />-----</ br><br /><img src='http://www.tecnologiadiaria.com/imagenes/2009/04/msn-icon.png' width='16' height='16' /> <b>email_2@live.com</b><br /><a href='#' onclick='change_psm(2)'><i>" + psm2 +"</i></a><br /></div>";
  27. }
  28.  
  29. function change_psm (account)
  30. {
  31. if (account == 1)
  32. psm = prompt ("New personal message:", psm);
  33. else if (account == 2)
  34. psm2 = prompt ("New personal message:", psm2);
  35.  
  36. if (psm == "")
  37. psm = "Set a personal message for this account";
  38. if (psm2 == "")
  39. psm2 = "Set a personal message for this account";
  40.  
  41. update_div ();
  42. }
  43.  
  44. function clear_tooltip ()
  45. {
  46. document.getElementById ("tooltip").innerHTML = "";
  47. div.style.display = "none";
  48. }
  49.  
  50. function tooltip ()
  51. {
  52. update_div ();
  53.  
  54. div.style.display = "block";
  55. timer_id = setTimeout ("clear_tooltip ()", 5000);
  56. }
  57. </script>
  58. </head>
  59. <body>
  60. <div onmouseover="tooltip()">FRIENDLY NAME</div>
  61. <div id="tooltip""></div>
  62. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement