Advertisement
solielios

Sticky note ♡

Sep 20th, 2021
2,609
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 1 0
  1. <!--coded by yukoki - sticky note scripts-->
  2.  
  3. <body>
  4. <div id="stickynote1">
  5. <div class="closestickynote1">X</div>
  6. <div class="dragstickynote1">> sticky note 1</div>
  7. <div class="stickynotecontent">
  8. Type what you want to put in your sticky note here.
  9. </div>
  10. </div><!--stickynote1 end-->
  11. </body>
  12.  
  13.  
  14. <head>
  15. <!--yukoki sticky note scripts-->
  16. <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  17. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  18. <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  19. <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  20. <script>
  21. $(function() {
  22. $( "#stickynote1" ).draggable({ handle: "div.dragstickynote1" });
  23. $(".closestickynote1").click(function(){$("#stickynote1").fadeOut();});
  24. });
  25. </script>
  26. <!--yukoki sticky note scripts end-->
  27. </head>
  28.  
  29. <style>.
  30.  
  31. #stickynote1 {
  32. width: 180px;
  33. margin-bottom: 20px;
  34. position: fixed;
  35. z-index: 100000000000;
  36. top: 30px; /** position from top of screen **/
  37. left: 30px; /** position from left of screen **/
  38. }
  39.  
  40. #stickynote1 {
  41. width: 180px; /** width of your sticky note **/
  42. background-color: rgba(165,216,216,0.7); /** background colour **/
  43. }
  44.  
  45. .dragstickynote1 {
  46. font-family: consolas;
  47. font-size: 10px;
  48. text-transform: uppercase;
  49. letter-spacing: 1px;
  50. padding: 10px;
  51. background-color: rgba(255,255,255,0.4);
  52. }
  53.  
  54. .closestickynote1 {
  55. cursor: pointer;
  56. margin-left: 148px;
  57. width: 32px;
  58. height: 32px;
  59. line-height: 32px;
  60. font-family: arial;
  61. font-size: 10px;
  62. position: absolute;
  63. text-align: center;
  64. float: right;
  65. background-color: rgba(255,255,255,0.4);
  66. }
  67.  
  68. .stickynotecontent {
  69. padding: 10px;
  70. font-family: consolas;
  71. font-size: 10px;
  72. }
  73.  
  74. .stickynotecontent b,strong {
  75. color: #000000; /** colour of bolded text **/
  76. }
  77.  
  78. .stickynotecontent i,em {
  79. color: #666666; /** colour of italic text **/
  80. }
  81.  
  82. .stickynotecontent a {
  83. text-decoration: underline;
  84. color: #666666; /** colour of linked text **/
  85. }
  86.  
  87. .stickynotecontent a:hover {
  88. color: #aaaaaa; /** colour of hovered linked text **/
  89. }
  90.  
  91. </style>
  92.  
  93. <br><br>
  94. You can add more sticky notes by first editing the scripts from the script in the head tag to apply to the added sticky notes. You should find two lines from the step 01 code that look like the ones below. Just duplicate them and change the number 1 to 2. It should look like:<br><br>
  95.  
  96. $( "#stickynote1" ).draggable({ handle: "div.dragstickynote1" });
  97. $(".closestickynote1").click(function(){$("#stickynote1").fadeOut();});
  98. $( "#stickynote2" ).draggable({ handle: "div.dragstickynote2" });
  99. $(".closestickynote2").click(function(){$("#stickynote2").fadeOut();});
  100.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement