Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. // popup window
  2. $('.show_popup').click(function() {
  3. var popup_id = $('#' + $(this).attr("rel"));
  4. $(popup_id).show();
  5. $('.overlay_popup').show();
  6. })
  7. $('.overlay_popup').click(function() {
  8. $('.overlay_popup, .popup').hide();
  9. })
  10. $('.envelope').click(function () {
  11. $('.envelope').hide();
  12. $('.close').show();
  13. })
  14. $('.close').click(function () {
  15. $('.close').hide();
  16. $('.envelope').show();
  17. })
  18.  
  19. <div class="content">
  20. <!-- icon element on the screen-->
  21. <div class="show_popup blue-circle" rel="popup1">
  22. <i class="fa fa-envelope-o envelope" aria-hidden="true"></i>
  23. <i class="fa fa-times close" aria-hidden="true"></i>
  24. </div>
  25. </div>
  26.  
  27. <div class="overlay_popup"></div>
  28.  
  29. <!-- popup element -->
  30. <div class="popup" id="popup1">
  31. <div id="text"></div>
  32. </div>
  33.  
  34. .popup,
  35. .overlay_popup {
  36. display: none;
  37. }
  38. .close {
  39. display: none;
  40. }
  41. .overlay_popup {
  42. position: fixed;
  43. left: 0px;
  44. top: 0px;
  45. right: 0px;
  46. bottom: 0px;
  47. z-index: 2;
  48. background: rgba(0, 0, 0, 0);
  49. }
  50.  
  51. .popup {
  52. position: fixed;
  53. z-index: 3;
  54. left: 87%;
  55. top: 93%;
  56. transform: translate(-50%, -50%);
  57. max-width: 200px;
  58. padding: 20px;
  59. background: #fff;
  60. z-index: 1;
  61. }
  62.  
  63. .blue-circle {
  64. position: fixed;
  65. left: 85%;
  66. top: 90%;
  67. width: 40px;
  68. height: 40px;
  69. background-color: #03a9f5;
  70. -moz-border-radius: 50px;
  71. -webkit-border-radius: 50px;
  72. border-radius: 50px;
  73. text-align: center;
  74. z-index: 2;
  75. }
  76. .blue-circle i {
  77. color: #ecfeff;
  78. font-size: 25px;
  79. margin-top: 7px;
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement