Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extended mode - allows pjax requests to update more than one container #7

Closed
wants to merge 7 commits into from

Conversation

spantaleev
Copy link
Contributor

Extended mode allows several containers to be updated with a
single request to the server. This is possible by having the
server do a bit more work and return a more meaningful response.

To go into extended mode don't specify a container when making
the request. In this case, the server needs to return a JSON response
specifying which containers to update, what page title to set, etc.

Normal mode should work as it used to, without being affected by this.

Extended mode allows several containers to be updated with a
single request to the server. This is possible by having the
server do a bit more work and return a more meaningful response.

To go into extended mode don't specify a container when making
the request. In this case, the server needs to return a JSON response
specifying which containers to update, what page title to set, etc.

Normal mode should work as it used to, without being affected by this.
This used to be a noop, meaning that it's unreliable to ever use
$.pjax directly (but only through $.fn.pjax).
The callback will be executed before $.pjax applies the response data
for a given request, but only if the response data looks valid.
This allows you to do some stuff before the content in the container(s)
gets replaced.
@defunkt
Copy link
Owner

defunkt commented Apr 16, 2011

I don't want to add too many features to pjax — we're doing this by using filter() in the success callback, but feel free to keep a fork with this functionality!

@defunkt defunkt closed this Apr 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants