setting columns to a max size for sortables
I am trying to set the height of columns when an item has been sorted
to the height of the biggest column.
It works for the first sort but then is fixed at that.
I think I need to get the height of the contents of the column rather
than the column itself but not much luck so far.
$('div.column').sortable({
items:$('div.widget'),
connectWith: ["#col1", "#col2",
"#col3"],
handle:'.menubar',
placeholder:'sort_placeholder',
helper:function (el){
return $
('.helper').clone().appendTo('body').css('display','block');
},
update:function(e,ui) {
var col1 = $
("#col1").height();
var col2 = $("#col2").height();
var col3 = $("#col3").height();
var newHeight = Math.max(col1,col2,col3);
$("#col1").height(newHeight);
$("#col2").height(newHeight);
$("#col3").height(newHeight);
},
start:function(e,ui) {
ui.helper.addClass('ontop');
},
stop:function(e,ui) {}
});
});