diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..3c53bb4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/bower_components/ +/nbproject/ +/nbproject/private/ diff --git a/jquery.pjax.js b/jquery.pjax.js index f480d5c7..dbf164f6 100644 --- a/jquery.pjax.js +++ b/jquery.pjax.js @@ -295,8 +295,12 @@ function pjax(options) { state: pjax.state, previousState: previousState }) - context.html(container.contents) - + + if(typeof options.replacementHandler === "function") + options.replacementHandler(context, container.contents, options) + else + context.html(container.contents) + // FF bug: Won't autofocus fields that are inserted via JS. // This behavior is incorrect. So if theres no current focus, autofocus // the last field.