RUSSEL86

Custom News letter Popup on pageload first time visit

May 6th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. <style>
  2.  
  3. #fvpp-blackout {
  4. display: none;
  5. z-index: 499;
  6. position: fixed;
  7. width: 100%;
  8. height: 100%;
  9. top: 0;
  10. left: 0;
  11. background: #f16334; opacity: 0.7;}
  12. #my-welcome-message {
  13. display: none;
  14. z-index: 500;
  15. position: fixed;
  16. width: 90%;
  17. left: 50%;
  18. top: 20%;
  19. padding: 20px 2%;
  20. text-align:center;
  21. max-width:700px;margin-left: -350px;}
  22. #fvpp-close {position: absolute; top: 10px; right: 20px;cursor: pointer;}
  23. #fvpp-dialog h2 {font-size: 2em; margin: 0;}
  24. #fvpp-dialog p { margin: 0; }
  25. .logo_area_pop.fix { text-align: center;}
  26. #my-welcome-message h2 {}
  27. .pop_textarea h1 {
  28. padding: 0 0 10px;
  29. color: #fff;
  30. font-weight: bold;
  31. text-transform: uppercase;}
  32. .pop_textarea h4 {font-weight: bold;color: #fff;text-transform: uppercase;}
  33. .pop_formarea.fix {}
  34. .pop_formarea.fix form.es_shortcode_form {}
  35. .pop_formarea.fix form.es_shortcode_form .es_lablebox {
  36. display: none;}
  37. .pop_formarea.fix form.es_shortcode_form .es_textbox {
  38. float: left;
  39. width: 48%;
  40. margin-left: 2%;}
  41. .pop_formarea.fix form.es_shortcode_form .es_textbox:nth-child(2) {
  42. margin-right: 2%;
  43. margin-left: 0;}
  44. .pop_formarea.fix form.es_shortcode_form
  45. .es_button {
  46. float: left;
  47. width: 100%;
  48. text-align: center;}
  49. .pop_formarea.fix form.es_shortcode_form .es_textbox input.es_textbox_class {
  50. margin: 0;}
  51. .pop_formarea.fix form.es_shortcode_form .es_button input#es_txt_button_pg {width: 100%; background-color: #f16334;border-color: #fff;color: #fff; border: solid 1px; margin-bottom: 10px;}
  52. .no_thanks.fix {position: relative;float: left;width: 100%;}
  53. .no_thanks.fix a#fvpp-close {color: #fff;font-size: 20px;text-decoration: underline;top: 0;left: 0;display: block;
  54. width: 100%;}
  55.  
  56. /* Tablet Layout: 768px. */
  57. @media only screen and (min-width: 768px) and (max-width: 991px) {
  58. #my-welcome-message { width: 500px;margin-left: -250px;}
  59. .pop_textarea h1{ font-size:30px;line-height: 32px;}
  60. .pop_textarea h4{ font-size: 20px;line-height: 25px;}
  61.  
  62. }
  63.  
  64. @media only screen and (max-width: 767px) {
  65. #my-welcome-message { width: 100%; left: 0; top: 5%;margin-left: 0px;}
  66. .pop_textarea h1{ font-size:25px;line-height: 27px;}
  67. .pop_textarea h4{ font-size: 17px;line-height: 20px;}
  68.  
  69. }
  70.  
  71.  
  72.  
  73.  
  74. </style>
  75. <div id="my-welcome-message">
  76. <div class="logo_area_pop fix">
  77. <img src="https://www.dogsora.com/wp-content/uploads/2016/12/logo.png" alt="">
  78. </div>
  79.  
  80. <div class="pop_textarea fix">
  81. <h1>DOGS HELPING PEOPLE BECOME BETTER OWNERS</h1>
  82. <h4>Get the Dogsora Dog-Friendly Newsletter</h4>
  83. </div>
  84.  
  85. <div class="pop_formarea fix">
  86. <?php echo do_shortcode('[email-subscribers namefield="YES" desc="" group="Public"]');?>
  87.  
  88. </div>
  89. <div class="no_thanks fix">
  90. <a href="" id="fvpp-close" class="no_close">No thanks, I have learned enough about dogs</a>
  91. </div>
  92.  
  93. </div>
  94.  
  95.  
  96. <script src="https://www.dogsora.com/wp-content/themes/admania-child/js/jquery.firstVisitPopup.min.js"></script>
  97. <script type="text/javascript">
  98. jQuery(function () {
  99. jQuery('#my-welcome-message').firstVisitPopup({
  100. cookieName : 'homepop',
  101. showAgainSelector: '#show-message'
  102. });
  103. });
  104.  
  105. </script>
  106. <script type="text/javascript">
  107. jQuery(".new_header_suscribe_form form.es_shortcode_form .es_textbox input#es_txt_email_pg").attr("placeholder", "Enter Your Email");
  108. jQuery(".pop_formarea.fix form.es_shortcode_form .es_textbox input#es_txt_name_pg").attr("placeholder", "Your Name");
  109. jQuery(".pop_formarea.fix form.es_shortcode_form .es_textbox input#es_txt_email_pg").attr("placeholder", "Email address");
  110. jQuery(".pop_formarea.fix form.es_shortcode_form .es_button input#es_txt_button_pg").val("KEEP ME IN THE LOOP");
  111. jQuery(".no_close").click(function(e){
  112. e.preventDefault();
  113. });
  114. </script>
Advertisement
Add Comment
Please, Sign In to add comment