title: JQuery: Hide anchor if href is empty
body: <p>Been on this one for a while now. Basically, I need to check where a <code>href</code> on an anchor tag with the class <code>.pdf-download</code> is empty, and if it is, hide it.</p>
  
  <p>I have attempted a few options but with no luck. This is what i have so far:</p>
  
  <pre><code>$("a.pdf-download").each(function (i) {
    if ($('[href]:empty',this).length == 1) { 
      $(this).hide();
    } else {
      $(this).show();
    }
  });
  </code></pre>