title: Uncaught SyntaxError: Unexpected end of input error
body: <p>Not sure why I'm getting an Uncaught SyntaxError: Unexpected end of input error on this, to be honest I have used this snippet in many places before and never had this issue? I obviously am just code blind this afternoon!</p>
  
  <pre><code>&lt;!-- jquery and bootstrap --&gt;
  &lt;script src="js/libs.min.js?t=1494075642"&gt;&lt;/script&gt;
  &lt;script src="js/template.js?t=1494075642"&gt;&lt;/script&gt;
  &lt;script&gt;
      // =======================
      // SUBMIT TO MAILCHIMP
      // =======================
      $(document).ready( function () {
      var action = "https://&lt;&lt;client_name&gt;&gt;.us13.list-manage.com/subscribe/post-json?u=207e8e8eebc7ed702d92e7928";
      var form = $('.mailchimp');
  
      if ( form.length &gt; 0 ) {
          $('.mailchimp button[type="submit"]').on('click', function(e) {
              e.preventDefault();
              form = $(this).closest(".mailchimp");
              register(form);
          });
      }
  
      function register(form) {
          $.ajax({
              type: form.attr('method'),
              url: form.attr('action'),
              data: form.serialize(),
              cache       : false,
              dataType    : 'json',
              contentType: "application/json; charset=utf-8",
              error       : function(err) {
                  alert("Could not connect to the registration server. Please try again later.");
              },
              success     : function(data) {
                  if (data.result != "success") {
                      $('#success').addClass("alert-danger").toggle().find("p").text(data.msg);
                      $('#mailchimpModal').modal('show');
                      $form.reset();
                  } else {
                      $('#success').addClass("alert-success").toggle().find("p").text(data.msg);
                      $('#mailchimpModal').modal('show');
                      $form.reset();
                  }
              }
          })
      }
  
  &lt;/script&gt;
  </code></pre>