Finding tags within tags in jquery and replacing content
<p>I have four <code>article</code> tags in my html page with the class <code>col</code>. Inside each article I have a <code>div</code> with the class <code>heading</code>. Inside of that I have an <code>img</code> tag.</p>

<p>I'm trying to iterate through each artcle and remove that image tag and replace with some different html.</p>

<p>This in Wordpress, hence the funky jquery function wrapper.</p>

<p>Right now im just trying to get the finding and replacing working (below) - I haven't attempted the different code for each article bit yet. I can't figure out why the below doesn't work.</p>

<pre><code>(function ($) {
  $(document).ready(function() {
    $('article.col').each(function(el) {
      $((el).find('heading img').replaceWith('&lt;newtag&gt;somecode&lt;/newtag&gt;'));  
    });
  });
 }(jQuery));
</code></pre>
