So I can make a div to scale nicely from it\'s center pivot: http://jsfiddle.net/uTDay/
However, the transition starts to change when I add in content inside the div: ht
I have taken my time on this one:
ALL boxes hide, and scale to their relative heights based on each elements properties.
http://jsfiddle.net/uTDay/11/
Code, using a function variable to be DRY.
var hide_those_boxes = function () {
$('.box , .box img').each(function(ix, obj) {
$(obj).animate({
opacity : 0,
left: '+='+$(obj).width()/4,
top: '+='+$(obj).height()/4,
height:0,
width:0
},
3000,
function() { $(obj).hide(); }
);
});
}
$(".btn a").click(hide_those_boxes);