title: jQuery check if href is undefined
body: <p>I want to check when an anchor tag has no href value, even though href is present in the tag, and then display a message to the user. eg.</p>
  
  <p>HTML:</p>
  
  <p></p>
  
  <p><strong>Note - I cannot change the way this anchor tag is defined, so I cannot add href=" ", the html is populated by wordpress and I do not want to change it</strong> </p>
  
  <p>jQuery:</p>
  
  <pre><code>$('a').click(function (e) {
      if ($(this).attr('href') == '') { 
          alert('We do not have more info on this');
          e.preventDefault();
      }
  })
  </code></pre>
  
  <p>The above code however only works when the href is defined as follows:</p>
  
  <pre><code>&lt;a href="" &gt;&lt;/a&gt;
  </code></pre>
  
  <p>How do I change my jQuery to check that href exists, but is not defined, like in my html above? I tried the following, but does not work either:</p>
  
  <pre><code>if ($(this).attr('href') === undefined) { 
  </code></pre>
  
  <p>Thanks</p>