どんな内容でも入れやすいクライアント向けの細かい機能を実装しました..
http://jsfiddle.net/gschutz/393Cb/1/
function increase(event){
$this = $(event.target);
if( $(".bigger").length > 0 )
decrease($(".bigger"));
$fixed_corner = $this.attr("rel").split(":");
if( !$this.hasClass("bigger") ){
$new = $this.clone();
$new.insertAfter($this);
$new.css("position", "absolute").addClass("bigger");
var offset = $this.position(), w = $this.outerWidth(true), h = $this.outerHeight(true);
if( $fixed_corner[0] == "top" )
$new.css("top", offset.top);
else
$new.css("bottom", offset.top-h);
if( $fixed_corner[1] == "left" )
$new.css("left", offset.left);
else
$new.css("right", offset.left-w);
$new.animate({width: "+=50", height: "+=30", backgroundColor: "#eee"});
console.log($fixed_corner);
} else {
decrease($this);
}
}
function decrease($this){
$this.animate({width: "-=50", height: "-=30", backgroundColor: "#aaa"}, 300, function(){$(this).remove();});
}
オブジェクトのサイズを変更する別の方法を追加できます。
divのサイズに注意してください。