re arranging divs

re arranging divs

I am trying to rearrage the divs position based on an array but the alignment is not according to the array and I am using the following code to do that.
 

var order = []; var elements = [];

var $modules = $( '.min );

$.each(Order,

function (i, position) {

elements.push($modules.get(position));

});