alicescreed

for hol

Aug 21st, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. <--!this goes in script-->
  2.  
  3. <script type="text/javascript"
  4. src="https://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('<a href="#" class="close"></a>');
  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. <--!this is my css-->
  36.  
  37. <!--the background fade-->
  38. #fade {
  39. display: none;
  40. background-color: #000;
  41. position: fixed;
  42. left: 0;
  43. top: 0;
  44. width: 100%;
  45. height: 100%;
  46. opacity: .5;
  47. z-index: 9999;
  48. }
  49. <!--the box itself-->
  50. .popup_block{
  51. display: none;
  52. padding: 20px;
  53. position: fixed;
  54. top: 50%;
  55. left: 50%;
  56. background-color: #e2d7d0;
  57. z-index: 99999;
  58. outline: 3px solid {Color:Borders};
  59. box-shadow: 2px 2px 10px #000;
  60. }
  61.  
  62. img.btn_close {
  63. float: right;
  64. margin: -55px -55px 0 0;
  65. }
  66.  
  67. *html #fade {
  68. position: absolute;
  69. }
  70.  
  71. *html .popup_block {
  72. position: absolute;
  73. }
  74.  
  75. <!--the html link codes-->
  76.  
  77. <a href="#?w=500(your width)" rel="pop1(name of pop)" class="poplight" title="{text:pop1 title}">✦</a>
  78.  
  79.  
  80. <!--the pop up itself, this goes last right before the body and html end code for me-->
  81. <div id="pop1" class="popup_block">
  82.  
  83.  
  84. Sesame snaps cotton candy cake donut cake tiramisu danish. Gummi bears biscuit brownie soufflé dessert dragée. Chupa chups dragée jelly. Fruitcake powder caramels lemon drops wafer. Jelly-o dessert icing gummi bears tiramisu gummi bears sweet wafer muffin. Carrot cake sweet marshmallow gummi bears biscuit marzipan jelly. Topping soufflé lemon drops jujubes biscuit tart. Chocolate gummies jujubes lemon drops muffin lemon drops halvah dessert.
  85.  
  86. Sesame snaps cotton candy cake donut cake tiramisu danish. Gummi bears biscuit brownie soufflé dessert dragée. Chupa chups dragée jelly. Fruitcake powder caramels lemon drops wafer. Jelly-o dessert icing gummi bears tiramisu gummi bears sweet wafer muffin. Carrot cake sweet marshmallow gummi bears biscuit marzipan jelly. Topping soufflé lemon drops jujubes biscuit tart. Chocolate gummies jujubes lemon drops muffin lemon drops halvah dessert.
  87.  
  88.  
  89. </div>
  90. </div>
Add Comment
Please, Sign In to add comment