jQuery日本語リファレンス

jQuery does not mean Japanese Query...

ヌー

Core/API/jQuery

jQuery.fn.extend(object)

jQueryエレメントに独自の新しいメソッドを追加する。(典型的なjQueryプラグインの作成方法)
引数
object
Object
jQueryオブジェクトにマージされる新たなメソッドを有したオブジェクト
戻り値
jQuery
jQueryオブジェクト
サンプル
サンプル1
jQueryオブジェクトに、新たに「全てチェック状態にする」「全て非チェック状態にする」メソッドを追加
jQuery.fn.extend({
 check: function() {
 return this.each(function() { this.checked = true; });
 },
 uncheck: function() {
 return this.each(function() { this.checked = false; });
 }
});
$("input[@type=checkbox]").check();
$("input[@type=radio]").uncheck();
[フレーム]
© Copyright 2009 by semooh.jp | Design by Free CSS Templates - Thanks to Dubai Apartments

AltStyle によって変換されたページ (->オリジナル) /