Show submit button dynamically when email is valid
<p>I'm sure this should be easy, but I can't get it working.</p>

<p>html</p>

<pre><code>&lt;label for="email"&gt;Enter email for updates:&lt;/label&gt;
&lt;input type="text" name="email" id="email" placeholder="your@email.com" /&gt;
&lt;button name="submit" type="submit"&gt;Submit&lt;/button&gt;
</code></pre>

<p>js</p>

<pre><code>$(document).ready(function() {

  $('button').hide();

  $('input').keyup(function() {
    if( !validateEmail(email) ){ 
      $('button').show();
    }
  };

  function validateEmail(email) {
    var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
    return emailReg.test( email );
  }

});
</code></pre>

<p>I'm not looking for it to be the best email validation, rather just a simple way to show users when form looks right.</p>

<p>Any help gratefully received.</p>
