Advertisement
Guest User

Untitled

a guest
Aug 27th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.12 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title></title>
  6. <script src="https://code.jquery.com/jquery-1.11.3.js"></script>
  7. <script type="text/javascript" src="rangy-master/external/log4javascript.js"></script>
  8. <script type="text/javascript" src="rangy-master/src/core/core.js"></script>
  9. <script type="text/javascript" src="rangy-master/src/core/dom.js"></script>
  10. <script type="text/javascript" src="rangy-master/src/core/domrange.js"></script>
  11. <script type="text/javascript" src="rangy-master/src/core/wrappedrange.js"></script>
  12. <script type="text/javascript" src="rangy-master/src/core/wrappedselection.js"></script>
  13. <script type="text/javascript" src="rangy-master/src/modules/rangy-classapplier.js"></script>
  14.  
  15. <script type="text/javascript">
  16.  
  17. var MyHighlight;
  18.  
  19. rangy.addInitListener(function(rangy) {
  20. MyHighlight = rangy.createClassApplier("highlight", true);
  21. });
  22.  
  23. $( document ).ready(function() {
  24.  
  25.  
  26. $(".boxes").mousedown(function() {
  27. MyHighlight.toggleSelection();
  28. document.getElementById('tooltip').style.display = 'none';
  29.  
  30. });
  31.  
  32. $("#actual_verse").mouseup(function() {
  33.  
  34.  
  35. var ele = document.getElementById('tooltip');
  36. ele.style.display = 'block';
  37.  
  38.  
  39. });
  40.  
  41.  
  42.  
  43. });
  44.  
  45.  
  46.  
  47.  
  48.  
  49. </script>
  50. <style>
  51.  
  52. /* Tool Kit */
  53.  
  54. #tooltip {
  55. position:absolute;
  56. display:none;
  57. border:grey solid 1px;
  58. background: #373737;
  59. padding: 5px;
  60. border-radius: 3px;
  61. }
  62. #cal1{
  63. position:absolute;
  64. height:0px;
  65. width:0px;
  66. top:100px;
  67. left:100px;
  68. overflow:none;
  69. z-index:-100;
  70. }
  71. #cal2{
  72. position:absolute;
  73. height:0px;
  74. width:0px;
  75. top:0;
  76. left:0;
  77. overflow:none;
  78. z-index:-100;
  79. }
  80.  
  81. .boxes {
  82. width: 15px;
  83. height: 15px;
  84. cursor: pointer;
  85. display: inline-block;
  86. margin-right: 2px;
  87. position: relative;
  88. top: 3px;
  89. }
  90.  
  91. #blue_box {
  92. background: #AAF6FF;
  93. }
  94.  
  95. #green_box {
  96. background: #D6FFAA;
  97. }
  98.  
  99. #orange_box {
  100. background: #FFBF98;
  101. }
  102.  
  103. #purple_box {
  104. background: #D7D5FC;
  105. }
  106.  
  107. #red_box {
  108. background: #FF9B9F;
  109. }
  110.  
  111. #yellow_box {
  112. background: #FFF8AA;
  113. }
  114.  
  115. /* Tool Kit */
  116.  
  117. #tooltip {
  118. position:absolute;
  119. display:none;
  120. border:grey solid 1px;
  121. background: #373737;
  122. padding: 5px;
  123. border-radius: 3px;
  124. }
  125. #cal1{
  126. position:absolute;
  127. height:0px;
  128. width:0px;
  129. top:100px;
  130. left:100px;
  131. overflow:none;
  132. z-index:-100;
  133. }
  134. #cal2{
  135. position:absolute;
  136. height:0px;
  137. width:0px;
  138. top:0;
  139. left:0;
  140. overflow:none;
  141. z-index:-100;
  142. }
  143.  
  144. .boxes {
  145. width: 15px;
  146. height: 15px;
  147. cursor: pointer;
  148. display: inline-block;
  149. margin-right: 2px;
  150. position: relative;
  151. top: 3px;
  152. }
  153.  
  154. #blue_box {
  155. background: #AAF6FF;
  156. }
  157.  
  158. #green_box {
  159. background: #D6FFAA;
  160. }
  161.  
  162. #orange_box {
  163. background: #FFBF98;
  164. }
  165.  
  166. #purple_box {
  167. background: #D7D5FC;
  168. }
  169.  
  170. #red_box {
  171. background: #FF9B9F;
  172. }
  173.  
  174. #yellow_box {
  175. background: #FFF8AA;
  176. }
  177.  
  178.  
  179. *.highlight {
  180. font-weight: bold;
  181. background-color:#ff0000;
  182. }
  183.  
  184.  
  185. </style>
  186. </head>
  187. <body>
  188. <span id='actual_verse'> Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here Hello There Good Day Sam Was Here </span>
  189. <div id='cal1'>&nbsp;</div>
  190. <div id='cal2'>&nbsp;</div>
  191. <div id='tooltip'> <div id='blue_box' class='boxes' title='Blue'></div> <div id='green_box' class='boxes' title='Green'></div> <div id='orange_box' class='boxes' title='Orange'></div> <div id='purple_box' class='boxes' title='Purple'></div> <div id='red_box' class='boxes' title='Red'></div> </div> <br> <br>
  192. </body>
  193. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement