jQueryã§WordPressã«Ajaxæ¤ç´¢ãå®è£ ãã
ããã²ã¼ã·ã§ã³æ¹åã®ããã«æ¤ç´¢ãAjaxã«ãã¦ãªã¢ã«ã¿ã¤ã ã«ã§ããããã«ãã¾ãããWordPressãªã楽ã å®è£ ã§ãã¾ããæ¬å½ã¯èª°ã§ãç°¡åã«ä½¿ããããã«ã³ããã§ãããããªå 容ã«ãããã¨æã£ããããããã§ããã©ãæ®å¿µãªããé¢åããããªã£ãã®ã§ãåããã®ããã°ã«å®è£ ããã³ã¼ããè²¼ãã ãã«ãã¾ããããã§ãããããææãã§ãã
JSãã¡ã¤ã«ãå«ããã¼ã¸ãAjaxãã¼ãããã¨ãã«JSãå®è¡ããªããããªãããããªã
ãã®åã¡ãã£ã¨èãããã®ã§ãã¡ã¢ã£ã¨ãã¾ãã
Ajaxã§JSå«ãã ãã¼ã¸ããã®ã¾ã¾ãã¼ãããã¨DOMã«è¿½å ããæç¹ã§å®è¡ããããã§ããããåé¿ããããã®ãã¤ã§ããAutopagerizeãåèã«ããã¨æãã¾ãã
ã¤ãã§ã«åå¾ããHTMLã®èµ°æ»æ¹æ³ã§ããããã®ã¾ã¾$(html)ã¨ãã«ããã¨ãä¸çªä¸ã®wrapperã¨ãããããdivã ã£ããããè¦ç´ ãåå¾ã§ããªãã®ã§ãä¸æ¦divããã¾ãã¦ããã¾ãã
Ajaxé¨åã®ã½ã¼ã¹ã³ã¼ã
$.ajax({   url: "hoge.html",   type: "GET",   success: function(html) {     // æååã§åå¾ãããã¼ã¿ãæ´çãã     html = html.replace(/
ã³ããç¨
html = html.replace(/