title: jQuery each loop with has()
body: <p>I'm trying to add a class to an anchor if it contains an image - but it's adding the class to every anchor regardless:</p>
  
  <pre><code>    $(".entry-content a").each( function(i, link) {
  
          if ($(link).has("img")) {
              $(link).addClass("fancybox");                   
          }
      });
  </code></pre>