I'm hoping someone can help! I have installed WordPress with the P2 theme and the Simple Mathjax plugin.

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.

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:

```
<?php wp_enqueue_script('jquery'); ?>
<?php wp_head(); ?>
<script type="text/javascript">
$(document).ready(function() {
$('.postcontent p').ajaxComplete('change', function() {
MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
});
});
</script>
```

But this doesn't work.

Any ideas?? Thanks!