Applying the text from the image height and width
<p>I have code like this</p>

<pre><code>&lt;script src='js.js'&gt;&lt;/script&gt;
    &lt;script&gt;
    (function($){
    var img = document.getElementsByClassName('x'),
          L = img.width(),
          T = img.height();
    for (var i=0,len=img.length;i&lt;len;i++){
    img[i] = $('#u').text("Width" + L + "Height " + T)
    }
    });
    &lt;/script&gt;
&lt;div id='image'&gt;
    &lt;img class='x' src='1.jpg'/&gt;
    &lt;span id='u'&gt;&lt;/span&gt;
    &lt;/div&gt;
    &lt;div id='image'&gt;
    &lt;img class='x' src='5.jpg'/&gt;
    &lt;span id='u'&gt;&lt;/span&gt;
    &lt;/div&gt;
</code></pre>

<p>i want to applying text width and height of image in <code>&lt;span id='u'&gt;&lt;/span&gt;</code>
but does not work,</p>
