Adding element before a div with title attribute containing content of the div using JQuery
<p>I have:</p>

<pre><code>&lt;li class="ingredient"&gt;
&lt;div&gt;
&lt;span class="amount"&gt;1 lb&lt;/span&gt;
&lt;span class="name"&gt;asparagus&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>i want to use jQuery to get:</p>

<pre><code>&lt;li class="ingredient"&gt;
&lt;img class="myImage" title="Yes!!! asparagus" src="/white2x2.gif"&gt;
&lt;div&gt;
&lt;span class="amount"&gt;1 lb&lt;/span&gt;
&lt;span class="name"&gt;asparagus&lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>so far I got:</p>

<pre><code> $(".ingredient div").before("&lt;class='myImage' src="/white2x2.gif' /&gt;");
</code></pre>

<p>but how do I get the title in there. Note that there is lots of these on the page and I want the title to represent the element.</p>

<p>Many thanks!</p>
