Inserting variable into array item
<p>I have an array of elements from my webpage which I am trying to then insert some html, stored as a variable into a matching array item. For example</p>

<pre><code>&lt;div class="play"&gt;
  &lt;div&gt;
    &lt;p&gt;Item to be inserted after this p tag&lt;/p&gt;
  &lt;/div&gt;
&lt;/div&gt;

var elements = $('.play');
//elements length = 4;
var item = '&lt;p&gt;HTML to be inserted&lt;/p&gt;'
$(item).appendTo(elements[1]);
</code></pre>

<p>In the above code I am trying to insert 'item' into the second value in the array within the child div shown in the html, however I am unsure how to insert it into the child div. At present this inserts 'item' after the parent html tag containing .play.</p>

<p>Any help would be greatly appreciated.</p>
