diff --git a/jquery.pjax.js b/jquery.pjax.js index d57269d4..112a66ea 100644 --- a/jquery.pjax.js +++ b/jquery.pjax.js @@ -192,6 +192,8 @@ function pjax(options) { options.data._pjax = options.container } + if (!options.fragment) options.fragment = options.container + function fire(type, args, props) { if (!props) props = {} props.relatedTarget = options.target @@ -700,7 +702,9 @@ function extractContainer(data, xhr, options) { obj.title = $fragment.attr('title') || $fragment.data('title') } - } else if (!fullDocument) { + } + + if (!fullDocument && !obj.contents) { obj.contents = $body }