title: Jquery Pjax - Ajax success function
body: <p>Currently I am translating my ajax calls to regular <code>$.pjax()</code> call. Everything works fine but ajax success function. I can't manage how to call pjax success function with given parameters. </p>
  
  <p>The only thing I can use is defining pjax global success function to be called on each pjax call:</p>
  
  <pre><code>   $(document).on('pjax:success', function(event, data, status, xhr, options) {
  
     });
  </code></pre>
  
  <p>But unfortunately I would like to define per call specific success function.</p>
  
  <p>Ajax call example: </p>
  
  <pre><code> $.ajax({
      url:"/myPage/myFunction",
      type:"POST",
      data:giveMeData(),
      success:function(data){$('#right_form').html(data);console.log('Success works!')}
   });
  </code></pre>
  
  <p>Pjax call example:</p>
  
  <pre><code> $.pjax({
      url:"/myPage/myFunction",
      type:"POST",
      container:'#right_form',
      data:giveMeData(),
      success:function(){console.log('Success works!')}
   });
  </code></pre>