diff -up pjax_old/pjax.js pjax/pjax.js
--- pjax_old/pjax.js	2012-05-16 22:39:12.000000000 +1000
+++ pjax/pjax.js	2014-12-04 11:11:03.000000000 +1000
@@ -13,8 +13,9 @@ Drupal.behaviors.pjax = {
     }
 
     // Set defaults.
-    $.pjax.defaults.scrollTo = Drupal.settings.pjax.scrollto !== "" ? parseInt(Drupal.settings.pjax.scrollto) : false;
+    $.pjax.defaults.scrollTo = Drupal.settings.pjax.scrollto !== "" ? parseInt(Drupal.settings.pjax.scrollto, 10) : false;
     $.pjax.defaults.timeout = Drupal.settings.pjax.timeout;
+    $.pjax.defaults.fragment = Drupal.settings.pjax.contentSelector;
 
     // Only proceed if a content selector is defined.
     if (Drupal.settings.pjax.contentSelector) {
@@ -24,14 +25,15 @@ Drupal.behaviors.pjax = {
         var $pjaxLinks;
 
         // Enable pjax for selected links.
-        // pjax() uses live(), so links that are removed and re-added will still work.
+        // pjax() uses on(), so links that are removed and re-added will still work.
         if (Drupal.settings.pjax.linksSelector) {
           $pjaxLinks = $(Drupal.settings.pjax.linksSelector);
-          $pjaxLinks.pjax(Drupal.settings.pjax.contentSelector)
-            // Add 'loading' class.
-            .live('click', function(e) {
-              $(this).addClass("pjax-link-loading");
-            });
+          $(document).pjax(Drupal.settings.pjax.linksSelector, Drupal.settings.pjax.contentSelector);
+
+          // Add 'loading' class.
+          $pjaxLinks.on('click', function(e) {
+            $(this).addClass("pjax-link-loading");
+          });
         }
 
         // Catch pjax start/end events.
@@ -66,6 +68,6 @@ Drupal.behaviors.pjax = {
       });
     }
   }
-}
+};
 
 })(jQuery);
diff -up pjax_old/pjax.module pjax/pjax.module
--- pjax_old/pjax.module	2012-05-16 22:39:12.000000000 +1000
+++ pjax/pjax.module	2014-12-04 11:40:46.000000000 +1000
@@ -101,7 +101,7 @@ function pjax_page_delivery_callback_alt
  * Delivers only the main content of the requested page, for pjax requests.
  */
 function pjax_deliver_page_content($page_callback_result) {
-  if (is_int($page_callback_result)) {
+  if(is_int($page_callback_result)) {
     // Pass over to drupal_deliver_html_page() to deal with errors.
     drupal_deliver_html_page($page_callback_result);
   }
@@ -110,10 +110,9 @@ function pjax_deliver_page_content($page
       drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
     }
 
-    // $page_callback_result contains the main contents of the page.
-    // Add a page title, which will be picked up and used by pjax.
-    $output = '<title>' . drupal_get_title() . '</title>' . render($page_callback_result);
-    print($output);
+    // Render the whole page
+    $page = element_info('page');
+    print drupal_render_page($page);
 
     // Make sure the requests are cached. pajax requests will be cached separately 
     // from standard page requests thanks to the "_pjax" query string.
