How to use PJAX? (PJAX With PHP?)
- by user1302430
I was trying to get PJAX working with my PHP site, this is the code I am using for it:
<script src="js/jquery.js"></script>
<script src="js/jquery.pjax.js"></script>
<script type="text/javascript">
$(function(){
// pjax
$('ul a').pjax('section')
})
</script>
I am just using the code they used on the PJAX demo page, but replacing the container they used (#main) with the one for my site, which was the section tag. There are no errors on the console or on the page, but it doesn't work either! Before I was using
$(function() {
$('ul a').pjax('section')
});
and
$('document').ready(function(){
$('ul a').pjax('section')
});
But when I don't use either of those and just use $('ul a').pjax('section') I see this error in the console:
Uncaught no pjax container for section in jquery.pjax.js (line: 353)
Could I get some help with this?
Thanks