title: Multiple If conditions in Javascript
body: <p>I Have javascript function who check input value and if requiment inputs ar note lenght 0 sent ajax post.</p>
  
  <pre><code>    function sendEmail(){
              var nn = jQuery("#your-name").val().length;
              var ee = jQuery("#friend-email").val().length;
  
              // var n = document.getElementById("your-name").value;
              // var e = document.getElementById("friend-email").value;
  
              if ( nn == 0 &amp;&amp; ee == 0 ) {
  
                  jQuery("input#your-name").css("border", "1px red solid");
                  jQuery("input#friend-email").css("border", "1px red solid");
  
              } 
              else if (ee == 0) {
  
                  jQuery("input#friend-email").css("border", "1px red solid");
  
              }
  
              else if ( nn == 0 ) {
  
                  jQuery("input#friend-name").css("border", "1px red solid");
  
              }
              else {
  
                  ajax();
              }
  }   
  </code></pre>
  
  <p>Everything works well, exept: If email is set and name is is not..Nothing happens (jQuery("input#friend-name").css("border", "1px red solid");)</p>
  
  <p>Whats wrong on this?
  See full example in jsfidle: <a href="http://jsfiddle.net/4X2J8/" rel="nofollow">http://jsfiddle.net/4X2J8/</a></p>