title: Using before() and after() with anchors
body: <p>i have a img</p>
  
  <pre><code>&lt;img id="dynamic" src="www.google.com.br" /&gt;
  </code></pre>
  
  <p>How can i use the before() and after() methods of jquery to set an anchor in that img?</p>
  
  <p>Like this:</p>
  
  <pre><code>$('#dynamic').before('&lt;a href="http://google.com"&gt;');
  $('#dynamic').after('&lt;/a&gt;');
  </code></pre>
  
  <p>But... when i do something like this, jquery automatically add the close tag of the anchor</p>
  
  <pre><code>&lt;a href="http://google.com"&gt;&lt;/a&gt;
  &lt;img id="dynamic" src="www.google.com.br" /&gt;
  </code></pre>
  
  <p>Some idea?</p>