From 6448ebad0329a487147f45d636f780a4dfd61e56 Mon Sep 17 00:00:00 2001 From: Baptiste Fontaine Date: Mon, 7 Apr 2014 23:11:05 +0200 Subject: [PATCH] reverting the .querySelector->.getElementById change to find the container in .smartLoad --- pjax-standalone.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pjax-standalone.js b/pjax-standalone.js index d83ad00..9eb3b53 100644 --- a/pjax-standalone.js +++ b/pjax-standalone.js @@ -242,7 +242,10 @@ if(title) document.title = title.innerHTML; - var container = document.getElementById(options.container.id); + // Going by caniuse all browsers that support the pushstate API also support querySelector's + // see: http://caniuse.com/#search=push + // see: http://caniuse.com/#search=querySelector + var container = html.querySelector("#" + options.container.id); if(container !== null) return container; // If our container was not found, HTML will be returned as is.