title: a:not(a:not([href])) selector
body: <p>I want that a certain action to be associated to the click event of the anchor tag whenever its <code>href</code> attribute:</p>
  
  <ul>
  <li>does not start with <code>mailto:</code> and</li>
  <li>does not end with <code>#</code> and</li>
  <li>is present with any value including empty</li>
  </ul>
  
  <p>So I was trying this code:</p>
  
  <pre><code>&lt;a href="example.com"&gt;example.com&lt;/a&gt;
  &lt;a href="mailto:someone@www.example.com"&gt;Someone&lt;/a&gt;
  &lt;a href="thepage#"&gt;The Page&lt;/a&gt;
  &lt;a&gt;This does nothing&lt;/a&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).on('click', 'a:not([href^="mailto\\:"], [href$="\\#"], [href])', myFunction);
  &lt;/script&gt;
  </code></pre>
  
  <p>And it didn't work. But to my dismay this works:</p>
  
  <pre><code>$(document).on('click', 'a:not([href^="mailto\\:"], [href$="\\#"], a:not([href]))', myFunction);
  </code></pre>
  
  <p>But I don't understand how. Notice the inner <code>:not()</code>. As I understand the <code>[href]</code> means there is no <code>href</code> attribute. Or is it the opposite?</p>
  
  <p>Could someone lead me to the light?</p>