{"id":4365,"date":"2013-02-27T19:45:54","date_gmt":"2013-02-27T10:45:54","guid":{"rendered":"http:\/\/www.webcyou.com\/?p=4365"},"modified":"2013-02-28T10:21:40","modified_gmt":"2013-02-28T01:21:40","slug":"pjax-pushstate-ajax-jquery-plugin-%e4%bd%bf%e7%94%a8%e6%96%b9%e6%b3%95-%e3%81%aa%e3%81%a9%e3%81%aa%e3%81%a9","status":"publish","type":"post","link":"https:\/\/www.webcyou.com\/?p=4365","title":{"rendered":"pjax (pushState + Ajax) jquery plugin \u4f7f\u7528\u65b9\u6cd5 \u306a\u3069\u306a\u3069"},"content":{"rendered":"<h4>pjax\u3068\u306f<\/h4>\n<p><strong>pjax<\/strong>\u306f<strong>pushState<\/strong>\u3068<strong>ajax<\/strong>\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u9020\u8a9e<strong>\uff08pushState + ajax = pjax\uff09<\/strong>\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u00a0<strong>pushState<\/strong>\u306f<strong>html5<\/strong>\u306b\u65b0\u5b9f\u88c5\u3055\u308c\u305f<strong>History API\u306e\u3072\u3068\u3064<\/strong>\u3067\u3001javascript\u304b\u3089\u30d6\u30e9\u30a6\u30b6\u306e\u5c65\u6b74\u306b\u76f4\u63a5\u633f\u3057\u8fbc\u3080\u70ba\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u8a73\u3057\u3044\u8a73\u7d30\u306f\u3053\u3061\u3089\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u81f4\u3057\u307e\u3059\u3002<\/p>\n<h3><a href=\"https:\/\/www.webcyou.com\/?p=4329\">HTML5 History API\u306b\u3064\u3044\u3066<\/a><\/h3>\n<p>\u518d\u3073Pjax\u306b\u95a2\u3057\u3066\u306a\u3093\u3067\u3059\u304c<strong>\u3001ajax<\/strong>\u3092\u7528\u3044\u3066\u8868\u793a\u5185\u5bb9\u3092\u66f8\u304d\u63db\u3048\u3001\u3055\u3089\u306b<strong>pushState<\/strong>\u3092\u7528\u3044\u3066\u305d\u308c\u306b\u5bfe\u5fdc\u3059\u308bURL\u3078\u3068\u7f6e\u304d\u63db\u3048<strong>history<\/strong>\u3082\u8fbf\u308c\u308b\u3088\u3046\u306b\u3059\u308b\u6280\u8853\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u3000ajax\u306b\u3088\u308b\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u304c\u671f\u5f85\u3067\u304d\u308b\u4ed6\u3001\u3088\u304f\u4f7f\u7528\u3055\u308c\u3066\u3044\u308b#!\uff08hashbang\uff09\u3092\u7528\u3044\u305f\u5834\u5408\u306eURL\u3068\u8868\u793a\u5185\u5bb9\u306e\u4e0d\u4e00\u81f4\u306e\u6539\u5584\u3092\u884c\u3046\u3053\u3068\u304c\u51fa\u6765\u305f\u308a\u3057\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u5fdc\u30d6\u30e9\u30a6\u30b6\u306fHTML5 pushState\u304c\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u30d6\u30e9\u30a6\u30b6\u3068\u306a\u308b\u305f\u3081\u3001IE\u306a\u3069\u3067\u306f\u4f7f\u7528\u3067\u304d\u306a\u3044\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u6280\u8853\u3092\u624b\u8efd\u3067\u3001\u975e\u5bfe\u5fdc\u30d6\u30e9\u30a6\u30b6\u306b\u95a2\u3057\u3066\u306f\u5225\u306e\u51e6\u7406\u3092\u884c\u3046\u3001\u5bb9\u6613\u306b\u5c0e\u5165\u53ef\u80fd\u306ajquery\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3068\u3057\u3066\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h4>jquery-pjax<\/h4>\n<p>\u305d\u306e\u540d\u3082<strong>jquery-pjax<\/strong>\u3002\u3068\u306a\u308a\u307e\u3059\u3002github\u306e\u65b9\u304c\u958b\u767a\u3057\u305f\u30d7\u30e9\u30b0\u30a4\u30f3\u3067\u3042\u308a\u3001github\u3067\u3082\u3053\u306e\u6280\u8853\u306f\u3064\u304b\u308f\u308c\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>jquery\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u306a\u306e\u3067jquery\u306f\u5fc5\u9808\u3068\u306a\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u7279\u5fb4<\/strong><\/p>\n<p>\u7279\u5fb4\u3068\u3057\u3066\u3042\u3052\u3089\u308c\u308b\u306e\u304c\u3001<\/p>\n<p><strong>\u300c\u30b5\u30fc\u30d0\u30fc\u5074\u306e\u8a2d\u5b9a\u3084\u30b3\u30fc\u30c9\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u7b49\u306e\u4f5c\u696d\u304c\u4e0d\u8981\u300d<\/strong><\/p>\n<p><strong>\u300c\u30da\u30fc\u30b8\u5358\u4f4d\u306bpjax\u306b\u3088\u308b\u79fb\u52d5\u306e\u53ef\u5426\u3092HTML\u3067\u6307\u5b9a\u53ef\u80fd\u300d<\/strong><\/p>\n<p><strong>\u300c\u540c\u6642\u306b\u8907\u6570\u306e\u9818\u57df\u3092\u66f4\u65b0\u300d<\/strong><\/p>\n<p><strong>\u300c\u66f4\u65b0\u307e\u3067\u306e\u5f85\u3061\u6642\u9593\u3092\u8a2d\u5b9a\u53ef\u80fd\u3002\u300d<\/strong><\/p>\n<p>\u306a\u3069\u304c\u6319\u3052\u3089\u308c\u307e\u3059\u3002<\/p>\n<p><strong>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/strong><\/p>\n<p><strong>GitHub<\/strong>\uff1a<a href=\"https:\/\/github.com\/falsandtru\/jquery.pjax.js\" target=\"_blank\">https:\/\/github.com\/falsandtru\/jquery.pjax.js<\/a><\/p>\n<p><strong>\u30d5\u30a1\u30a4\u30eb<\/strong>\uff1a<a href=\"https:\/\/raw.github.com\/falsandtru\/jquery.pjax.js\/master\/jquery.pjax.js\" target=\"_blank\">https:\/\/raw.github.com\/falsandtru\/jquery.pjax.js\/master\/jquery.pjax.js<\/a><\/p>\n<p><strong>jquery-pjax<\/strong>\u306e\u52d5\u4f5c\u306a\u306e\u3067\u3059\u304c\u3001\u307e\u305a\u3001\u73fe\u5728\u306e\u30d6\u30e9\u30a6\u30b6\u304cpjax\u3092\u4f7f\u7528\u3067\u304d\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3001ajax\u6642\u306e\u901a\u4fe1\u306e\u969b<strong>\u300cX-PJAX\u300d<\/strong>\u3068\u3044\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u30fc\u3092\u4ed8\u52a0\u3057\u307e\u3059\u3002pjax\u304c\u4f7f\u3048\u306a\u3044\u5834\u5408\u306f\u901a\u5e38\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u52d5\u4f5c\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u300cX-PJAX\u300d<\/strong>\u3068\u3044\u3046\u7279\u5225\u306a\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u30fc\u3092\u4ed8\u52a0\u3059\u308b\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u5074\u3067\u3082\u5bfe\u5fdc\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u300cX-PJAX\u300d<\/strong>\u3068\u3044\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u30fc\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u306fpjax\u306e\u51e6\u7406\u3092\u3001\u5b58\u5728\u3057\u306a\u3044\u306e\u3067\u3042\u308c\u3070\u901a\u5e38\u306e\u51e6\u7406\u3092\u3002\u7b49\u4f7f\u3044\u5206\u3051\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<h4>\u4f7f\u3044\u65b9<\/h4>\n<p>\u305d\u308c\u3067\u306f\u4f7f\u3063\u3066\u884c\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305a\u3001jQuery\u304c\u5fc5\u8981\u3067\u3059\u306e\u3067\u3001jQuery\u306e\u8aad\u307f\u3053\u307f\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&lt;script type=&quot;text\/javascript&quot; src=&quot;jquery-1.9.1.min.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>\u305d\u3057\u3066\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305fjquery.pjax.js\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&lt;script type=&quot;text\/javascript&quot; src=&quot;jquery.pjax.js&quot;&gt;&lt;\/script&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8aad\u307f\u8fbc\u3080\u30d5\u30a1\u30a4\u30eb\u306f\u3053\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u691c\u8a3c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u307e\u305a\u306f\u540c\u30d5\u30a1\u30a4\u30eb\u5185\u30da\u30fc\u30b8\u3067\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5165\u308c\u66ff\u3048\u306eTest\u3092\u3002<\/p>\n<p><strong>pjax<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$.pjax({\r\n  container : '#changeContent',\r\n  fragment : '#pjaxContent',\r\n  timeout : 1000\r\n});<\/pre>\n<p>pjax\u306e\u8a2d\u5b9a\u306f\u4e0a\u8a18\u306e\u69d8\u306a\u611f\u3058\u3067\u8a2d\u5b9a\u3057\u3066\u3044\u304d\u307e\u3059\u3002\uff08\u8a73\u7d30\u306f\u5f8c\u307b\u3069\uff09<\/p>\n<p>\u7d9a\u3044\u3066HTML\u306e\u6e96\u5099\u3002<\/p>\n<p><strong>HTML<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">&lt;a class=&quot;pjax&quot; href=&quot;#&quot;&gt;\u5165\u308c\u66ff\u3048&lt;\/a&gt;\r\n&lt;div id=&quot;changeContent&quot;&gt;\r\n  &lt;p&gt;\uff11\u3064\u3081\u306ediv#content\u306b\u306a\u308a\u307e\u3059\u3002\uff08\u5165\u308c\u66ff\u308f\u308b\uff09&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;p&gt;===============================&lt;\/p&gt;\r\n&lt;div&gt;\r\n  &lt;p&gt;\uff12\u3064\u3081\u306ediv\u306b\u306a\u308a\u307e\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n&lt;p&gt;===============================&lt;\/p&gt;\r\n&lt;div id=&quot;pjaxContent&quot;&gt;\r\n  &lt;p&gt;3\u3064\u3081\u306ediv\u306b\u306a\u308a\u307e\u3059\u3002&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>\uff11\u3064\u3081\u306ediv#content\u306b3\u3064\u3081\u306ediv#pjaxContent\u306b\u5dee\u3057\u66ff\u3048\u307e\u3059\u3002 a class=&#8221;pjax&#8221;\u3092\u30c8\u30ea\u30ac\u30fc\u306b\u3059\u308bscript\u3092\u8a18\u8ff0\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$(document).on('click', 'a.pjax', function(e) {\r\n  e.preventDefault();\r\n  $.pjax({\r\n    container : '#changeContent',\r\n    fragment : '#pjaxContent',\r\n    timeout : 1000\r\n  });\r\n});<\/pre>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/pjax\/index001.html\" target=\"_blank\"><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/a><\/p>\n<p> <a href=\"http:\/\/webcyou.com\/demo\/js\/pjax\/index001.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/pjax\/index001.html<\/a><\/p>\n<p> \u3068\u308a\u3042\u3048\u305a\u3053\u308c\u3067div#changeContent\u5185\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u304cdiv#pjaxContent\u5185\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306b\u5dee\u3057\u66ff\u308f\u308a\u307e\u3059\u3002\u7c21\u5358\u3067\u3059\u306d\u3002\u3067\u3001\u4f55\u304cpjax\u304b\u3068\u8a00\u308f\u308c\u307e\u3059\u3068\u3001\u300c\u5165\u308c\u66ff\u3048\u300d\u306e\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u5ea6\u306b\u5c65\u6b74\u304c\u5897\u3048\u3066\u3044\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002 \u3053\u308c\u304cHTML5 pushState\u306e\u6a5f\u80fd\u3068\u306a\u308a\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u623b\u308b\u3067\u30af\u30ea\u30c3\u30af\u3092\u3059\u308b\u524d\u306b\u623b\u308b\u4e8b\u304c\u53ef\u80fd\u3068\u306a\u3063\u3066\u304d\u307e\u3059\u3002 \u3053\u306e\u4ed6\u306b\u3082\u3001\u3082\u3061\u308d\u3093\u5225\u30d5\u30a1\u30a4\u30eb\u5185\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u53d6\u5f97\u3057\u3001\u5165\u308c\u66ff\u3048\u3092\u884c\u3046\u3053\u3068\u3082\u51fa\u6765\u307e\u3059\u3002 \u305d\u308c\u3067\u306f\u305d\u3061\u3089\u306e\u30c6\u30b9\u30c8\u3092\u884c\u3044\u307e\u3059\u3002 <strong>HTML 1\u30da\u30fc\u30b8\u76ee index-b001.html<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;h1&gt;pjax test&lt;\/h1&gt;\r\n&lt;ul class=&quot;links&quot;&gt;\r\n\t&lt;li&gt;&lt;a class=&quot;pjax&quot; href=&quot;index-b001.html&quot;&gt;page1 link&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a class=&quot;pjax&quot; href=&quot;index-b002.html&quot;&gt;page2 link&lt;\/a&gt;&lt;\/li&gt;\r\n\t&lt;li&gt;&lt;a class=&quot;pjax&quot; href=&quot;index-b003.html&quot;&gt;page3 link&lt;\/a&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;p&gt;\u3053\u308c\u3088\u308a\u4ee5\u4e0b\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u5165\u308c\u66ff\u3048\u3092\u884c\u3044\u307e\u3059\u3002&lt;\/p&gt;\r\n&lt;div id=&quot;pjaxContent&quot;&gt;\r\n&lt;h2&gt;\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u3002&lt;\/h2&gt;\r\n  &lt;h2&gt;\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u3002&lt;\/h2&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 1\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>HTML 2\u30da\u30fc\u30b8\u76ee index-b002.html<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;h1&gt;pjax test page2&lt;\/h1&gt;\r\n&lt;div id=&quot;pjaxContent&quot;&gt;\r\n  &lt;h2&gt;\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u3002&lt;\/h2&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>HTML 3\u30da\u30fc\u30b8\u76ee index-b003.html<\/strong><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&lt;h1&gt;pjax test page3&lt;\/h1&gt;\r\n&lt;div id=&quot;pjaxContent&quot;&gt;\r\n  &lt;h2&gt;\u3053\u3053\u306f 3\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u3002&lt;\/h2&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 3\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 3\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n  &lt;p&gt;\u3053\u3053\u306f 3\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab\u3053\u3053\u306f 3\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u306e\u4e2d\u8eab&lt;\/p&gt;\r\n&lt;\/div&gt;\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u69d8\u306b\uff11\u30da\u30fc\u30b8\u306e\u307f\u30e1\u30cb\u30e5\u30fc\u90e8\u5206\u306e\u30ea\u30b9\u30c8\u3092\u7f6e\u3044\u3066\u30012,3\u30da\u30fc\u30b8\u306b\u306f\u5165\u308c\u66ff\u3048\u308b\u5bfe\u8c61\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u914d\u7f6e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u52d5\u4f5c\u3068\u3057\u3066\u306f\u3001\u30ea\u30f3\u30af\u306e\u30e1\u30cb\u30e5\u30fc\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u969b\u30011\u30da\u30fc\u30b8\u76ee\u306epjaxContent\u5185\u306b2,3\u30da\u30fc\u30b8\u76ee\u306epjaxContent\u3092\u5165\u308c\u66ff\u3048\u308b\u3002<\/p>\n<p>\u3068\u8a00\u3063\u305f\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>script\u306b\u95a2\u3057\u3066\u306f\u5148\u307b\u3069\u306escript\u306b\u4ee5\u4e0b\u306e\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u306e\u95a2\u6570\u3092\u52a0\u3048\u3001\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u306b\u3088\u308b\u547c\u3073\u51fa\u3057\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$('#pjaxContent').animate({ });<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$(document).on('click', 'a.pjax', function(e) {\r\n  e.preventDefault();\r\n  var href = $(this).attr('href');\r\n  $('#pjaxContent').animate({\r\n    opacity : 0\r\n  }, 'slow', function() {\r\n    $.pjax({\r\n      url: href,\r\n      container : '#pjaxContent',\r\n      fragment : '#pjaxContent',\r\n      timeout : 2000\r\n    });\r\n  });\r\n});<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u66f4\u306b\u3001pjax\u304c\u5b8c\u4e86\u3057\u305f\u3089\u547c\u3073\u51fa\u3055\u308c\u308b\u30a4\u30d9\u30f3\u30c8<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">pjax:end<\/pre>\n<p>\u3092\u7528\u3044\u3066\u3001\u5b8c\u4e86\u3057\u305f\u3089\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u30b3\u30f3\u30c6\u30f3\u30c4\u306eopcity\u30921\u306b\u3059\u308b\u30a8\u30d5\u30a7\u30af\u30c8\u304c\u4ed8\u4e0e\u3055\u308c\u308b\u3088\u3046\u306b\u95a2\u6570\u306e\u8a18\u8ff0\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n$(document).on('pjax:end', function() {\r\n  $('#pjaxContent').animate({\r\n    opacity : 1\r\n  }, 'slow');\r\n});<\/pre>\n<p>\u3053\u308c\u3089\u3092\u542b\u3081\u305f\u5168\u4f53\u306escript\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">$(document).on('click', 'a.pjax', function(e) {\r\n  e.preventDefault();\r\n  var href = $(this).attr('href');\r\n  $('#pjaxContent').animate({\r\n    opacity : 0\r\n  }, 'slow', function() {\r\n    $.pjax({\r\n      url: href,\r\n      container : '#pjaxContent',\r\n      fragment : '#pjaxContent',\r\n      timeout : 2000\r\n    });\r\n  });\r\n});\r\n\r\n$(document).on('pjax:end', function() {\r\n  $('#pjaxContent').animate({\r\n    opacity : 1\r\n  }, 'slow');\r\n});\r\n<\/pre>\n<p>\u305d\u308c\u3067\u306f\u3001\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af\u81f4\u3057\u307e\u3057\u3087\u3046\u3002\u6307\u5b9a\u3057\u305f\u30b3\u30f3\u30c6\u30f3\u30c4\u9818\u57df\u306b2\u30da\u30fc\u30b8\u76ee\u30683\u30da\u30fc\u30b8\u76ee\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u308b\u306e\u304c\u78ba\u8a8d\u51fa\u6765\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u8a3c\u62e0\u306b\u3001\u5c65\u6b74\u304c\u8ffd\u52a0\u3055\u308c\u3066\u3001\u623b\u308c\u305f\u308a\u9032\u3081\u305f\u308a\u53ef\u80fd\u3067\u3042\u308a\u307e\u3059\u304c\u3001\u5b9f\u969b\u306e2\u30da\u30fc\u30b8\u76ee\u30013\u30da\u30fc\u30b8\u76ee\u306eURL\u3092\u53e9\u304f\u3068\u30e1\u30cb\u30e5\u30fc\u90e8\u5206\u304c\u8868\u793a\u3055\u308c\u305a\u3001\u898b\u51fa\u3057\u3082\u300c\u3053\u3053\u306f 2\u30da\u30fc\u30b8\u306e\u30b3\u30f3\u30c6\u30f3\u30c4\u3067\u3059\u3002\u300d\u7b49\u306b\u5909\u308f\u308b\u306e\u304c\u78ba\u8a8d\u51fa\u6765\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30c7\u30e2\u30da\u30fc\u30b8\u306f\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u304b\u3089\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>\u30c7\u30e2\u30da\u30fc\u30b8<\/strong><\/p>\n<p><a href=\"http:\/\/webcyou.com\/demo\/js\/pjax\/index-b001.html\" target=\"_blank\">http:\/\/webcyou.com\/demo\/js\/pjax\/index-b001.html<\/a><\/p>\n<h4>pjax\u306e\u30a4\u30d9\u30f3\u30c8<\/h4>\n<p>pjax\u306e\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30a4\u30d9\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p><strong>pjax:start<\/strong><\/p>\n<p>pjax\u304c\u958b\u59cb\u3055\u308c\u305f\u3068\u304d\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:end<\/strong><\/p>\n<p>pjax\u304c\u7d42\u4e86\u3057\u305f\u3068\u304d\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:beforeSend<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u958b\u59cb\u3055\u308c\u308b\u524d\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:send<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u958b\u59cb\u3057\u305f\u5f8c\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:complete<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u7d42\u4e86\u3057\u305f\u5f8c\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:success<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u6210\u529f\u3057\u305f\u5f8c\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:error<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u5931\u6557\u3057\u305f\u5f8c\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:timeout<\/strong><\/p>\n<p>ajax\u30ea\u30af\u30a8\u30b9\u30c8\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u6642\u306b\u767a\u751f\u3002<\/p>\n<p><strong>pjax:popstate<\/strong><\/p>\n<p>\u30d6\u30e9\u30a6\u30b6\u306e\u623b\u308b\u9032\u3080\u306a\u3069\u3092\u884c\u3063\u305f\u6642\u306b\u767a\u751f\u3002<\/p>\n<h4>pjax\u306e\u30d7\u30ed\u30d1\u30c6\u30a3<\/h4>\n<p><strong>id\u00a0<\/strong>: state\u306e\u540d\u524d\u6307\u5b9a<\/p>\n<p><strong>url<\/strong> : \u5bfe\u8c61\u306eurl<\/p>\n<p><strong>container\u00a0<\/strong>: \u7f6e\u304d\u63db\u3048\u308b\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>\n<p><strong>push<\/strong> :\u00a0\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306ffalse\u3002<\/p>\n<p><strong>fragment\u00a0<\/strong>: \u7f6e\u304d\u63db\u3048\u3089\u308c\u308b\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>\n<p><strong>timeout<\/strong> :\u00a0timeout\u3059\u308b\u6642\u9593\uff08timeout\u6642\u9593\u3092\u8d85\u3048\u308b\u3068 location.href \u306b\u3088\u308b\u9077\u79fb\u3092\u884c\u3046\uff09<\/p>\n<p><strong>scrollTo<\/strong> : \u00a0\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306ffalse\u3002\u51e6\u7406\u5f8c\u306e\u30b9\u30af\u30ed\u30fc\u30eb\u7bc4\u56f2\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002<\/p>\n<div>\u4ee5\u4e0a\u306b\u306a\u308a\u307e\u3059\u30fc\u3002<\/div>\n","protected":false},"excerpt":{"rendered":"<p>pjax\u3068\u306f pjax\u306fpushState\u3068ajax\u3092\u7d44\u307f\u5408\u308f\u305b\u305f\u9020\u8a9e\uff08pushState + ajax = pjax\uff09\u3068\u306a\u308a\u307e\u3059\u3002 \u00a0pushState\u306fhtml5\u306b\u65b0\u5b9f\u88c5\u3055\u308c\u305fHistory API\u306e\u3072\u3068\u3064\u3067\u3001jav [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[171,59,167,177,168,176,166,37,47,179,46,107,180,173,58,44,39,178,64,78,114,118],"class_list":["post-4365","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-android","tag-android-sdk","tag-css","tag-css3","tag-html","tag-html5","tag-iphone","tag-iphone-","tag-javascript-2","tag-jquery","tag-js","tag-mamp","tag-mysql","tag-php","tag-sdk","tag-web","tag-39","tag-178","tag-64","tag-78","tag-114","tag-118"],"_links":{"self":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4365"}],"version-history":[{"count":17,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4365\/revisions"}],"predecessor-version":[{"id":4392,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=\/wp\/v2\/posts\/4365\/revisions\/4392"}],"wp:attachment":[{"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcyou.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}