title: Find an element, then insert content after the next
body: <p>I am struggling with this piece of code for the last few hours now.
  Hopefully you can help me :)
  What I try to achieve:</p>
  
  <ol>
  <li>Find an element.</li>
  <li>Insert html after the element that follows the elment found in (1).</li>
  </ol>
  
  <p>Here's my HTML:</p>
  
  <pre><code>&lt;div class="paragraph" data-template="1" data-id="1"&gt;&lt;/div&gt;
  &lt;div class="icons"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I want to insert after the element with the "icons" class, so I try:</p>
  
  <pre><code>$(data).insertAfter('.paragraph').find('[data-id="'+appendAfter+'"]').next('.icons');
  </code></pre>
  
  <p>.. where $(data) is a HTML string</p>
  
  <p>That fails.
  If I remove the next() function, it inserts before icons, but that is not what I want:</p>
  
  <pre><code>$(data).insertAfter('.paragraph').find('[data-id="'+appendAfter+'"]');
  </code></pre>
  
  <p>So finding the element works, but not skipping the element after that and then insert.</p>
  
  <p>Cheers,
  Robert</p>