EDIT: (non) working example here:
http://www.jogos-mmorpg.com/pjax.html
I am trying to reproduce a very simple PJAX example as described in readme ( https://github.com/defunkt/jquery-pjax )
This is index.html:
<!DOCTYPE html>
<html>
<head>
<script src="http://pjax.heroku.com/jquery.js"></script>
<script src="http://pjax.heroku.com/jquery.pjax.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(document).pjax('a', '#pjax-container')
});
</script>
</head>
<body>
<h1>My Site</h1>
<div class="container" id="pjax-container">
Go to <a href="./next.html">next page</a>.
</div>
</body>
</html>
And this is next.html
<p>next page</p>
When I click on the βnext pageβ link, I just go to next.html, and the only thing I see on the screen is the βnext pageβ paragraph, just like me with pjax completely disabled.
What am I missing?
source
share