JSFiddle - React, Tailwind, and code Playground

HTML

<html>
  <head>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
    <script type="text/javascript" src="https://raw.github.com/defunkt/jquery-pjax/master/jquery.pjax.js"></script>
  </head>

  <body>
    <div id="valtozo">
      This will be replaced.
    </div>

    <!-- Replace href="" with href="news.html" -->
    <a href="" data-pjax="#valtozo">Show news</a>
      
    <hr />     
      
    <p>
      Note that the result will be <code>{"error": "Please use POST request"}</code> since this example doesn't have a good <code>news.html</code> to request.
    </p>
  </body>
</html>

JavaScript

$('a[data-pjax]').pjax();

$('body').bind('pjax:start', function(event, xhr, options) {
    alert("pjax:start triggered");

    $(options.container).fadeOut("fast", function() {
        alert("Faded out");
    });
}).bind('pjax:end', function(event, xhr, options) {
    alert("pjax:end triggered");

    $(options.container).fadeIn("fast", function() {
        alert("Faded in");
    });
});