jQuery プラグイン修正版
2010年05月03日(月)
前回のエントリーを修正しました。
というより前のがひどすぎました。
jQuery.fn.biyoon = function(scale,duration,easing){
//var target = this;
return this.each(function(){
ini_width=jQuery(this).attr("width");
ini_height=jQuery(this).attr("height");
jQuery(this).data({"ini_width":ini_width,"ini_height":ini_height});
jQuery(this).bind("mouseover",biyon).bind("mouseout",rbiyon);
//return target;
});
//拡大
function biyon(e){
selector=e.target;
after_width=selector.width*scale+"px";
after_height=selector.height*scale+"px";
$(selector).stop().animate({width:after_width,height:after_height},duration,easing);
}
//戻す
function rbiyon(e){
selector=$(e.target);
selector.stop().animate({width:selector.data("ini_width"),height:selector.data("ini_height")},duration,easing);
}
};
関連記事
- jQuery プラグイン修正版
- jQuery はじめてのjQueryプラグイン(駄作)
- jQuery 複数の要素に処理を
- jQuery シェイクする
- AS3 fl.transitions
- jQuery スライドショーでフェードイン、フェードアウト2010
- jQuery submitでconfirm
- PHP 月のセレクトボックス作成
- jQueryによる、属性変更
- jQuery aのイベントでリンクさせない処理
- AS3 Rectangle
- jQuery 要素の高さを取得
- FlashLiteはきらい
- jQuery aのイベントでリンクさせない処理2
- jQuery 兄弟要素はどうやって選択するのかね?