HTML - Javascript - input condition
<p>Ive been looking but cant seem to find much clarification...
I am creating a form -
If a user is to select an option for contact "email",
the user must enter a text value for email input type.</p>

<p>Here is a fiddle- <a href="https://jsfiddle.net/4s3bLf65/" rel="nofollow noreferrer">https://jsfiddle.net/4s3bLf65/</a></p>

<pre><code>      if ($("input[name='option']").val()=='email') &amp;&amp;($("input[name='email1']").val() == '')
  {
    alert('Enter email');
                            return false;  
  }  
</code></pre>

<p>I cant seem to figure out the proper syntax for the js...
Any suggestions?</p>