Jump to content

Namrata

Member
  • Posts

    13
  • Joined

  • Last visited

Posts posted by Namrata

  1. Hello, I tried the following code but it didn't work for me. When i input the email it just stays there in the box and nothing happens after. What should i do?

     

    Thanks

    <style>
    
      .captcha-container {
    
        display : none;
      
        }
        
      </style>
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
    
      $( ( ) => {
      
        $( '.newsletter-form-button' ).click ( function ( ) {
        
          const email = $( '.email input' ).val ( );
          
          const firstName = $( '.first-name input' ).val ( );
          
          if ( ! firstName && email ) return; // bail if first name or email is empty
          
          $( '.captcha-container' ).css ( 'display', 'block' );
          
          } );
          
        } );
        
      </script>
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.