/*-------------------------------------------------- マウスオーバー時自分の幅と高さを取得して2倍に拡大 --------------------------------------------------*/ $.fn.zoom = function(){ return this.each(function(){ var myW = $(this).width(); var myH = $(this).height(); $(this).mouseover(function(){ $(this).css({display:"block"}); $(this).animate({ width: myW*2+"px", height: myH*2+"px", fontSize: "200%" },"fast","swing"); }); $(this).mouseout(function(){ $(this).animate({ width: myW, height: myH, fontSize: "100%" },"fast","swing") }); }); }