How I can sort images by dimension in javascript or jquery
<p>How I can sort images by dimension in JavaScript or jQuery. My code is following:</p>

<pre><code>var imgsrc = '';
if (document.images.length &lt; 1) {
    alert('No images to open');
    return;
}
for (var i = 0; i &lt; window.parent.document.images.length; i++) {
    imgsrc + = '\n';
}

if (imgsrc != '') {
    var newwin = window.open('', '');
    newwin.document.open();
    newwin.document.write('\n' + imgsrc + '');
    newwin.document.close();
} else {
    alert('No images!')
}​
</code></pre>

<p>Please help me out. Thank you in advance.</p>
