Change the text of corresponding node with attribute's value using jquery
<p>How to change the text of corresponding node with attribute's value using jquery</p>

<pre><code>&lt;div class="rating"&gt;
    &lt;h2 typename="First"&gt;One is First&lt;/h2&gt;
    &lt;h2 typename="Second"&gt;Two is Second&lt;/h2&gt;
    &lt;h2 typename="Third"&gt;Three is Third&lt;/h2&gt;
&lt;/div&gt;
</code></pre>

<p>to </p>

<pre><code>&lt;div class="rating"&gt;
    &lt;h2 typename="First"&gt;First&lt;/h2&gt;
    &lt;h2 typename="Second"&gt;Second&lt;/h2&gt;
    &lt;h2 typename="Third"&gt;Third&lt;/h2&gt;
&lt;/div&gt;
</code></pre>

<p>Here I want to change the <code>h2</code> text with its corresponding attribute value <code>typename</code>. 
How to do so ?</p>
