{"id":4450136,"date":"2013-12-28T04:00:24","date_gmt":"2013-12-28T04:00:24","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/simple-mathjax-does-not-refresh-on-p2-theme\/"},"modified":"2016-08-21T14:12:47","modified_gmt":"2016-08-21T14:12:47","slug":"simple-mathjax-does-not-refresh-on-p2-theme","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/simple-mathjax-does-not-refresh-on-p2-theme\/","title":{"rendered":"Simple Mathjax does not refresh on P2 theme"},"content":{"rendered":"<p>I&#8217;m hoping someone can help! I have installed WordPress with the P2 theme and the Simple Mathjax plugin.<\/p>\n<p>Mathjax renders find on load. But it breaks the moment I update one of the posts. I have to actually refresh the entire page to get this to render.<\/p>\n<p>I read on the mathjax homepage that this is an issue with AJAX. So I have tried placing this code into the P2 header.php file:<\/p>\n<pre><code>&lt;?php wp_enqueue_script(&#039;jquery&#039;); ?&gt;\n&lt;?php wp_head(); ?&gt;\n&lt;script type=&quot;text\/javascript&quot;&gt;\n$(document).ready(function() {\n\t$(&#039;.postcontent p&#039;).ajaxComplete(&#039;change&#039;, function() {\n\t\tMathJax.Hub.Queue([&quot;Typeset&quot;,MathJax.Hub]);\n\t});\n});\n&lt;\/script&gt;<\/code><\/pre>\n<p>But this doesn&#8217;t work.<\/p>\n<p>Any ideas?? Thanks!<\/p>\n","protected":false},"template":"","class_list":["post-4450136","topic","type-topic","status-closed","hentry","topic-tag-ajax","topic-tag-mathjax"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4450136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4450136\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4450136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}