defunkt/jquery-pjax — pull request #80 by tmeasday (2012-01-11 10:13:02+00:00)
Title: Allow PJAX to be used on form submission

Not as complicated a commit as it looks. Does a couple things

1. Allows you to bind to the submit event on a form, treats it very similarly to the click event on a link.
2. Splits the success callback into two methods, the page replacing part + the state changing part so it:
3. Deals gracefully with 422 status codes, which aren't errors, but require the page to be changed.

Also there's a very minor change, which is to wrap the result from the server in

before trying to extract the fragment, in case all the server returns is the fragment.

Let me know if there's anything I can do to simplify it.