Advertisement
PayneLess_Designs

PayneLess Designs - Show Box Script

Jun 21st, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.21 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
  3. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  4. <title>Show Box Script</title>
  5. <meta name="language" content="en" />  
  6. <meta name="description" content="" />  
  7. <meta name="keywords" content="" />
  8. <style type="text/css">
  9. .box {
  10. width: 200px;
  11. height: 200px;
  12. background: #000;
  13. border: solid 3px #ccc;
  14. position: fixed;
  15. top: 50%;
  16. left: 50%;
  17. margin-top: -100px;
  18. margin-left: -100px;
  19. display: none;
  20. }
  21.  
  22. p {
  23. color: #fff;
  24. text-align: center;
  25. padding-top: 20px;
  26. }
  27.  
  28. * html .box { position: absolute }
  29. </style>
  30. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  31. <script type="text/javascript">
  32. //<![CDATA[  
  33. $(document).ready(function(){
  34. $('#popup').click(function(){
  35. $('.box').fadeIn('slow');
  36. });
  37. $('#close').click(function(){
  38. $('.box').hide();
  39. });
  40. });
  41. //]]>
  42. </script>
  43. </head>
  44. <body>
  45. <p><a href="#" id="popup">Show Box</p>
  46. <div class="box">
  47. <p>Centered Box</p>
  48. <p><a href="#" id="close">Close</a></p>
  49. </div>
  50. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement