title: jQuery logical operator not working as expected
body: <p>I have below code which is not working.</p>
  
  <pre><code>var book_id = $('#indexBookSearch');
  var tag_id  = $('#indexTagSearch');
  
  if((book_id.val() == "") || (tag_id.val() == ""))
  {
      $('#userMessages').html('&lt;div class="alert alert-info"&gt;'+
          '&lt;button type="button" class="close" data-dismiss="alert"&gt;&amp;times;'+
          '&lt;/button&gt;'+
          '&lt;strong&gt;Information ! &lt;/strong&gt; Please select search criteria first.'+
      '&lt;/div&gt;');
      return false;
  }
  </code></pre>
  
  <p><code>if((book_id.val() == "") || (tag_id.val() == ""))</code> this line is not working if even if either of the field has <code>value</code> inside of it.</p>
  
  <p>Both <code>Book</code> and <code>Tag</code> is <code>select box</code> i have checked their value using <code>console.log()</code> and its coming perfectly.</p>
  
  <p><strong>I have also changed</strong> </p>
  
  <pre><code>if((book_id.val() == "") || (tag_id.val() == ""))
  </code></pre>
  
  <p><strong>to</strong> </p>
  
  <pre><code>if(book_id.val() == "" || tag_id.val() == "")
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>HTML FORM</p>
  
  <pre><code>&lt;form id="indexSearchForm" action="books/listTags" method="POST"&gt;
      &lt;fieldset&gt;
          &lt;legend&gt;Search Criteria&lt;/legend&gt;
  
          &lt;label&gt;Select Book&lt;/label&gt;
          &lt;select class="input-large" name="book_id" id="indexBookSearch"&gt;
              &lt;option value=""&gt;--Select--&lt;/option&gt;
              &lt;option value="109"&gt;book 1&lt;/option&gt;
          &lt;/select&gt;
  
          &lt;label&gt;Select Tag&lt;/label&gt;
          &lt;select class="input-large" name="tag_id" id="indexTagSearch"&gt;
              &lt;option value=""&gt;--Select--&lt;/option&gt;
              &lt;option value="10"&gt;adding&lt;/option&gt;
              &lt;option value="1"&gt;Apples&lt;/option&gt;
              &lt;option value="39"&gt;article&lt;/option&gt;
              &lt;option value="34"&gt;bhg&lt;/option&gt;
              &lt;option value="40"&gt;boon&lt;/option&gt;
          &lt;/select&gt;       
          &lt;button class="btn btn-primary" type="submit"&gt;Submit&lt;/button&gt;
      &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>jQuery Code</p>
  
  <pre><code>$('#indexSearchForm').submit(function(e)
  {
      e.preventDefault();
  
      var book_id = $('#indexBookSearch');
      var tag_id  = $('#indexTagSearch');
  
      if( !book_id.val() || !tag_id.val())
      {
          $('#userMessages').html('&lt;div class="alert alert-info"&gt;'+
              '&lt;button type="button" class="close" data-dismiss="alert"&gt;&amp;times;&lt;/button&gt;'+
              '&lt;strong&gt;Information ! &lt;/strong&gt; Please select search criteria first.'+
          '&lt;/div&gt;');
          return false;
      }
      // more process
  });
  </code></pre>
  
  <p>Thanks.</p>