Advertisement
skyroleplays

for daddyghoul

Mar 29th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. <!-- this part goes before style type text/css --!>
  2. <script type="text/javascript"
  3. src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
  4. <script>
  5. $(document).ready(function() {
  6. //
  7. $('a.poplight[href^=#]').click(function() {
  8. var popID = $(this).attr('rel'); //Get Popup Name
  9. var popURL = $(this).attr('href'); //Get Popup href to define size
  10. var query= popURL.split('?');
  11. var dim= query[1].split('&');
  12. var popWidth = dim[0].split('=')[1]; //Gets the first query string value
  13. $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" class="close"></a>');
  14. var popMargTop = ($('#' + popID).height() + 80) / 2;
  15. var popMargLeft = ($('#' + popID).width() + 80) / 2;
  16. //Apply Margin to Popup
  17. $('#' + popID).css({
  18. 'margin-top' : -popMargTop,
  19. 'margin-left' : -popMargLeft
  20. });
  21. $('body').append('<div id="fade"></div>');
  22. $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer - .css({'filter' : 'alpha(opacity=80)'})
  23. return false;
  24. });
  25. $('a.close, #fade').live('click', function() {
  26. $('#fade , .popup_block').fadeOut(function() {
  27. $('#fade, a.close').remove(); //fade them both out
  28. });
  29. return false;
  30. });
  31. });
  32. </script>
  33.  
  34. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
  35.  
  36. <script src="http://static.tumblr.com/iuw14ew/VSQma1786/jquery.style-my-tooltips.js"></script>
  37.  
  38. <!-- and this part goes after it --!>
  39. #fade { /*--Transparent background layer--*/
  40. display: none; /*--hidden by default--*/
  41. background:{color:scrollbar};
  42. position: fixed; left: 0; top: 0;
  43. width: 100%; height: 100%;
  44. opacity: .90;
  45. z-index: 9999;
  46. }
  47. .popup_block{
  48. display: none; /*--hidden by default--*/
  49. background:{color:background};
  50. font-family:calibri;
  51. color:#000;
  52. padding: 10px;
  53. border: 3px solid {color:background};
  54. float: left;
  55. height:200px;
  56. overflow:auto;
  57. font-size: 10;
  58. position: fixed;
  59. top: 50%; left: 50%;
  60. z-index: 99999;
  61. /*--CSS3 Box Shadows--*/
  62. -webkit-box-shadow: 0px 0px 20px #000;
  63. -moz-box-shadow: 0px 0px 20px #000;
  64. box-shadow: 0px 0px 20px #000;
  65. /*--CSS3 Rounded Corners--*/
  66. -webkit-border-radius: 5px;
  67. -moz-border-radius: 5px;
  68. border-radius: 5px;
  69. }
  70. img.btn_close {
  71. float: right;
  72. margin: -20 -20px 0 0;
  73. }
  74. /*--Making IE6 Understand Fixed Positioning--*/
  75. *html #fade {
  76. position: absolute;
  77. }
  78. *html .popup_block {
  79. position: absolute;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement