Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. <div id="blog_subscription-2" class="et_pb_widget jetpack_subscription_widget"><h4 class="widgettitle">Subscribe to Blog via Email</h4>
  2. <form action="#" method="post" accept-charset="utf-8" id="subscribe-blog-blog_subscription-2">
  3. <div id="subscribe-text"><p>Enter your email address to subscribe to my blog and receive notifications of new posts by email.</p>
  4. </div> <p id="subscribe-email">
  5. <label id="jetpack-subscribe-label" for="subscribe-field-blog_subscription-2" style="clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden;">
  6. Email Address </label>
  7. <input type="email" name="email" required="required" class="required" value="" id="subscribe-field-blog_subscription-2" placeholder="Email Address">
  8. </p>
  9.  
  10. <p id="subscribe-submit">
  11. <input type="hidden" name="action" value="subscribe">
  12. <input type="hidden" name="source" value="https://katyhood.com/my-creative-haven/">
  13. <input type="hidden" name="sub-type" value="widget">
  14. <input type="hidden" name="redirect_fragment" value="blog_subscription-2">
  15. <input type="submit" value="Subscribe" name="jetpack_subscriptions_widget">
  16. </p>
  17. </form>
  18.  
  19. <script>
  20. /*
  21. Custom functionality for safari and IE
  22. */
  23. (function( d ) {
  24. // In case the placeholder functionality is available we remove labels
  25. if ( ( 'placeholder' in d.createElement( 'input' ) ) ) {
  26. var label = d.querySelector( 'label[for=subscribe-field-blog_subscription-2]' );
  27. label.style.clip = 'rect(1px, 1px, 1px, 1px)';
  28. label.style.position = 'absolute';
  29. label.style.height = '1px';
  30. label.style.width = '1px';
  31. label.style.overflow = 'hidden';
  32. }
  33.  
  34. // Make sure the email value is filled in before allowing submit
  35. var form = d.getElementById('subscribe-blog-blog_subscription-2'),
  36. input = d.getElementById('subscribe-field-blog_subscription-2'),
  37. handler = function( event ) {
  38. if ( '' === input.value ) {
  39. input.focus();
  40.  
  41. if ( event.preventDefault ){
  42. event.preventDefault();
  43. }
  44.  
  45. return false;
  46. }
  47. };
  48.  
  49. if ( window.addEventListener ) {
  50. form.addEventListener( 'submit', handler, false );
  51. } else {
  52. form.attachEvent( 'onsubmit', handler );
  53. }
  54. })( document );
  55. </script>
  56.  
  57. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement