We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b66dc2 commit 4b0e2a9Copy full SHA for 4b0e2a9
ja/jQuery/README.md
@@ -21,7 +21,7 @@ jQueryプラグインはprototype拡張のように `$.fn.greenify = function ()
21
22
`jQuery.fn`の実装を見てみると、実態は`jQuery.prototype`であるため実際にprototype拡張していることがわかります。
23
24
-```
+```js
25
// https://github.com/jquery/jquery/blob/2.1.4/src/core.js#L39
26
jQuery.fn = jQuery.prototype = {
27
// prototypeの実装
@@ -31,7 +31,7 @@ jQuery.fn = jQuery.prototype = {
31
32
`$()`は内部的に`new`をしてjQueryオブジェクトを返すので、このjQueryオブジェクトではprototypeに拡張したメソッドが利用できます。
33
34
35
$(document.body); // 返り値はjQueryのインスタンス
36
```
37
@@ -65,7 +65,7 @@ jQueryではそこをどうやってカバーしているかというと、
65
66
`$.fn`と同様に`prototype`へのaliasを貼っているだけのただのコンストラクタ関数です。
67
68
69
calculator.fn = calculator.prototype;
70
71
0 commit comments