Advertisement
dullcevita

no pop-ups

May 1st, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.05 KB | None | 0 0
  1. to delete popups, delete the code below from the css:
  2.  
  3. <script type="text/javascript"
  4. src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
  5. <script>
  6. $(document).ready(function() {
  7. //
  8. $('a.poplight[href^=#]').click(function() {
  9. var popID = $(this).attr('rel'); //Get Popup Name
  10. var popURL = $(this).attr('href'); //Get Popup href to define size
  11. var query= popURL.split('?');
  12. var dim= query[1].split('&');
  13. var popWidth = dim[0].split('=')[1]; //Gets the first query string value
  14. $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend;
  15. var popMargTop = ($('#' + popID).height() + 80) / 2;
  16. var popMargLeft = ($('#' + popID).width() + 80) / 2;
  17. //Apply Margin to Popup
  18. $('#' + popID).css({
  19. 'margin-top' : -popMargTop,
  20. 'margin-left' : -popMargLeft
  21. });
  22. $('body').append('<div id="fade"></div>');
  23. $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'})
  24. return false;
  25. });
  26. $('a.close, #fade').live('click', function() {
  27. $('#fade , .popup_block').fadeOut(function() {
  28. $('#fade, a.close').remove(); //fade them both out
  29. });
  30. return false;
  31. });
  32. });
  33. </script>
  34.  
  35. /* POP UP */
  36.  
  37. #fade { /*--Transparent background layer--*/
  38. display: none; /*--hidden by default--*/
  39. background: {color:background};
  40. position: fixed; left: 0; top: 0;
  41. width: 100%; height: 100%;
  42. opacity: .80;
  43. z-index: 9999;
  44. }
  45.  
  46. .popup_block{
  47. display: none; /*--hidden by default--*/
  48. background: transparent;
  49. padding: 20px;
  50. float: left;
  51. position: fixed;
  52. top:50%;
  53. left:50%;
  54. z-index: 99999;
  55. height:347px;
  56. }
  57.  
  58. .poptext {
  59. margin-left:auto;
  60. margin-right:auto;
  61. margin-top:-15px;
  62. width:250px;
  63. padding:10px;
  64. margin-left:170px;
  65. height:450px;
  66. overflow:auto;
  67. text-align:justify;
  68. color:{color:background};
  69. background-color:#dddddd;
  70. }
  71.  
  72. .poptext a {
  73. color:{color:bold};
  74. }
  75.  
  76. .popask {
  77. margin-left:auto;
  78. margin-right:auto;
  79. margin-top:-10px;
  80. width:400px;
  81. padding:40px 40px 40px 40px;
  82. margin-left:160px;
  83. font-weight:bold;
  84. overflow:hidden;
  85. text-align:justify;
  86. font-size:14px;
  87. }
  88.  
  89.  
  90. .popnav {
  91. margin-left:auto;
  92. margin-right:auto;
  93. margin-top:-70px;
  94. width:360px;
  95. padding:40px 40px 40px 40px;
  96. margin-left:150px;
  97. font-weight:bold;
  98. overflow:auto;
  99. text-align:justify;
  100. color:{color:text};
  101. font-size:14px;
  102. background-repeat:no-repeat;
  103. }
  104.  
  105. img.btn_close {
  106. float: right;
  107. margin: -5px -5px 0 0;
  108. }
  109. /*--Making IE6 Understand Fixed Positioning--*/
  110. *html #fade {
  111. position: absolute;
  112. }
  113. *html .popup_block {
  114. position: absolute;
  115. }
  116.  
  117. /* POPUP NAVIGATION */
  118.  
  119. #table {
  120. display: block;
  121. font-size: 12px;
  122. font-family: 'times';
  123. text-align: center;
  124. margin-left:-30px;
  125. margin-top:100px;
  126. }
  127.  
  128. #links {
  129. display: block;
  130. font-decoration: none;
  131. width: 400px;
  132.  
  133. }
  134.  
  135. #links a {
  136. display: block;
  137. padding: 6px;
  138. color: white;
  139. background-color:#202020;
  140. -moz-transition-duration:1s;
  141. -webkit-transition-duration:1s;
  142. -o-transition-duration:1s;
  143. text-decoration: none;
  144. }
  145.  
  146. #links a:hover {
  147. display: block;
  148. padding: 6px;
  149. color:{color:em};
  150. -moz-transition-duration:1s;
  151. -webkit-transition-duration:1s;
  152. -o-transition-duration:1s;
  153. text-decoration: none;
  154. }
  155.  
  156. AND all this from below the </body> part of the html:
  157.  
  158.  
  159. <div id="01" class="popup_block">
  160. <div class="popask">
  161.  
  162. <p><iframe frameborder="0" scrolling="no" width="100%" height="190" src="http://www.tumblr.com/ask_form/USERNAME.tumblr.com" style="background-color:transparent; overflow:hidden;" id="ask_form"></iframe><!--[if IE]><script type="text/javascript">document.getElementById('ask_form').allowTransparency=true;</script><![endif]--></p>
  163.  
  164. <p><iframe frameborder=“0” scrolling=“no” width=“100%” height=“190” src=“http://www.tumblr.com/ask_form/avegodafrid.tumblr.com” style=“background-color:transparent; overflow:hidden;” id=“ask_form”></iframe><!–[if IE]><script type=“text/javascript”>document.getElementById(‘ask_form’).allowTransparency=true;</script><![endif]–></p>
  165.  
  166. </div>
  167. </div>
  168.  
  169.  
  170. <div id="02" class="popup_block">
  171. <div class="poptext">
  172.  
  173. maybe some rules??
  174.  
  175.  
  176. </div>
  177. </div>
  178.  
  179. <div id="03" class="popup_block">
  180. <div class="poptext">
  181.  
  182. an about page or something idk
  183.  
  184.  
  185. </div>
  186. </div>
  187.  
  188. <div id="04" class="popup_block">
  189. <div class="poptext">
  190.  
  191. verses, whatever, whatever
  192.  
  193.  
  194. </div>
  195. </div>
  196.  
  197.  
  198. <div id="05" class="popup_block">
  199. <div class="popnav"><div id="links"><table id="table" table border="0" cellspacing="" cellpadding="2"><center>
  200.  
  201. <tr>
  202. <td><a href="/">LINK</a></td>
  203. <td><a href="/">LINK</a></td>
  204. <td><a href="/">LINK</a></td>
  205. </tr>
  206.  
  207. <td><a href="/">LINK</a></td>
  208. <td><a href="/">LINK</a></td>
  209. <td><a href="/">LINK</a></td>
  210. </tr>
  211.  
  212. <tr>
  213. <td><a href="/">LINK</a></td>
  214. <td><a href="/">LINK</a></td>
  215. <td><a href="/">LINK</a></td>
  216. </tr>
  217.  
  218.  
  219. </center></table></div></div></div>
  220.  
  221. </div>
  222. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement