I am a complete novice with javascript. I want to add pjax to a webpage created with wordpress, and I am stuck with the initial implementation of it. The pjax docs say:

“Let’s talk more about the most basic way to get started:

$(document).pjax('a', '#pjax-container')

This will enable pjax on all links and designate the container as #pjax-container.”

While I am sure that this is self-evident to someone with any experience, I have no idea where to put this code snippet. Any guidance is appreciated.

Read more here: Getting started with pjax


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: