sizeを使うといいらしいよ。
で、ソースを見てみると、こういうふうに書いてある。(1-11.2)
なるほど、thisのlengthを取得しているわけですね。
// The number of elements contained in the matched element set jQuery.fn.size = function() { return this.length; };
ちなみに、ソースコードを見たいならダウンロードしなくてもこういうものがあるので便利になりました。
sizeを使うといいらしいよ。
で、ソースを見てみると、こういうふうに書いてある。(1-11.2)
なるほど、thisのlengthを取得しているわけですね。
// The number of elements contained in the matched element set jQuery.fn.size = function() { return this.length; };
ちなみに、ソースコードを見たいならダウンロードしなくてもこういうものがあるので便利になりました。