jquery-pjax
jquery-pjax copied to clipboard
Allow to change context in a `pjax:beforeReplace` handler
What's the use case?
Also, this requires tests.
Hi, @mislav
My use case is: when popup form was successfully submitted the server returns a content which used to refresh the "main" container (redirect-to-list in no-pjax scenario). I can detect this outcome in pjax:beforeReplace event handler and substitute the target context.
I've appended a test to a previous commit.
@mislav and @AntonTyutin the pull request I have proposed here https://github.com/defunkt/jquery-pjax/pull/428 I believe satisfies the needs of both.