From 920ca8ee6751cc12a7c7ec65d9ea696ec1e4bbed Mon Sep 17 00:00:00 2001 From: Teppei Sato Date: Mon, 31 Aug 2015 15:23:11 +0900 Subject: [PATCH] chore(jquery): syntax highlight for JS --- ja/jQuery/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ja/jQuery/README.md b/ja/jQuery/README.md index 98385d1..828cfdb 100644 --- a/ja/jQuery/README.md +++ b/ja/jQuery/README.md @@ -21,7 +21,7 @@ jQueryプラグインはprototype拡張のように `$.fn.greenify = function () `jQuery.fn`の実装を見てみると、実態は`jQuery.prototype`であるため実際にprototype拡張していることがわかります。 -``` +```js // https://github.com/jquery/jquery/blob/2.1.4/src/core.js#L39 jQuery.fn = jQuery.prototype = { // prototypeの実装 @@ -31,7 +31,7 @@ jQuery.fn = jQuery.prototype = { `$()`は内部的に`new`をしてjQueryオブジェクトを返すので、このjQueryオブジェクトではprototypeに拡張したメソッドが利用できます。 -``` +```js $(document.body); // 返り値はjQueryのインスタンス ``` @@ -65,7 +65,7 @@ jQueryではそこをどうやってカバーしているかというと、 `$.fn`と同様に`prototype`へのaliasを貼っているだけのただのコンストラクタ関数です。 -``` +```js calculator.fn = calculator.prototype; ```