title: jQuery select dropdown option with only one non-blank option
body: <p>I'm dealing with a storefront package (so I don't have the option to edit core files) and we have dropdown menus to select which front and back the user wants for a business card. Some of the cards have only one option, so the client would like to hide the dropdown menu if there's only one option.</p>
  
  <p>Easy, right?</p>
  
  <pre><code>$("select").each(function(){
      var count = $(this).children("option").length;
      if ( count == 1 ) {
          // there's only one option, do something
      }
  });
  </code></pre>
  
  <p>That works, but the problem is that the system sometimes generates a blank <code>&lt;option&gt;</code> for some of the dropdowns, so there's really two options, but only one "real" option:</p>
  
  <pre><code>&lt;select&gt;
      &lt;option&gt;&lt;/option&gt;
      &lt;option value="Something"&gt;A real option&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Basically, I need to select <code>&lt;select&gt;</code>s that only have one <code>&lt;option&gt;</code>, or two <code>&lt;option&gt;</code>s and one is just empty.</p>
  
  <p>I can't quite wrap my head around the logic of such an if statement, so if anyone has any suggestions, it would be greatly appreciated.</p>