How to extract value from title of link tag using jquery?
<p>I have something like this:</p>

<pre><code>&lt;ul class="links"&gt;

    &lt;li&gt;
        &lt;a title="Link 1 description" href="example.html"&gt;Link 1&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a title="Link 2 description" href="example2.html"&gt;Link 2&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a title="Link 3 description" href="example3.html"&gt;Link 3&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;a title="Link 4 description" href="example4.html"&gt;Link 4&lt;/a&gt;
    &lt;/li&gt;

&lt;/ul&gt;
</code></pre>

<p>And want to get something like this:</p>

<pre><code>&lt;ul class="links"&gt;

    &lt;li&gt;
        &lt;span class="description"&gt;Link 1 description&lt;/span&gt;
        &lt;a title="Link 1 description" href="example.html"&gt;Link 1&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;span class="description"&gt;Link 2 description&lt;/span&gt;
        &lt;a title="Link 2 description" href="example2.html"&gt;Link 2&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;span class="description"&gt;Link 3 description&lt;/span&gt;
        &lt;a title="Link 3 description" href="example3.html"&gt;Link 3&lt;/a&gt;
    &lt;/li&gt;

    &lt;li&gt;
        &lt;span class="description"&gt;Link 4 description&lt;/span&gt;
        &lt;a title="Link 4 description" href="example4.html"&gt;Link 4&lt;/a&gt;
    &lt;/li&gt;

&lt;/ul&gt;
</code></pre>

<p>I need to extract the value from title of every link and then add this value between span tags with addClass description before the li tag.</p>

<p>Any idea how to do this?</p>

<p>Thanks in advance.</p>
