title: Selecting linked image by same attribute in jQuery
body: <p>I want to make a light box pop up from some linked images, but I have no control over its id or class, these come from an SMF forum.</p>
  
  <p>I need to compare linked images to see if their <code>src</code> and <code>href</code> attributes are the same, and then use the light box plugin.</p>
  
  <p>I managed to get this in the document ready function:</p>
  
  <pre><code>$('a.bbc_link:has(img.resized)').lightboxplugin();
  </code></pre>
  
  <p>This makes all images launch the lightbox plugin, but I need to compare the <code>img</code> src and the link <code>href</code> to see if they are the same, and then use the plugin.</p>
  
  <p>Sadly, it has to be made with jQuery, which I have little experience with.</p>