JQuery Get the height of dynamically added pictures before appending into the DOM
<p>The question is pretty straight forward, my intention is to, later on, append the pictures into 3 different columns depending on the used vertical space by the pictures that is the reason i need to know the height of the pictures.</p>

<p>The following is my script</p>

<pre><code> $( document ).ready(function() {

 //----------------------------------image feed-----------------------------
//random generator
    //array length 
        arr = []; arr.length = 94; //Number of images
        $.each(arr, function(i,v){v = i+1; arr[i] = v;});
        //random
        var i= arr.length, j, temp;
        while(--i &gt; 0){
            j = Math.floor(Math.random() * (i + 1));
            temp = arr[j]; arr[j] = arr[i]; arr[i]=temp;
            };
//end of image feed and random

//load all thumbnails

    window.imagesThumb = [];
    $.each(arr, function(i,v){
        myImagethumb = $(new Image()).attr({
            "src":"img/pictures/thumbnails/img"+v+".jpg",
            "id":v,
            "class":"image"
        }); 
        imagesThumb[i] = myImagethumb; 

    });


//--------------------------------END OF IMAGE FEED-------------------------

});  
</code></pre>