[UPDATE: Indie Labs ended up doing their own port to jQuery, and it's better. I'm leaving this up for historical reason only] Warn users when they try to leave a form with unsaved changes. Ported from Indie Lab's "Informant".
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.markdown
jquery.informant.html
jquery.informant.js

README.markdown

jquery.informant

A jQuery port of Indie Lab's Informant for Prototype.js

Bonus features in the jQuery plugin version:

  • easily include/exclude forms based on selector, e.g.:

$('form:not([class~=uninformed])').informant();

  • easily adjust the alert message, e.g.:

$('form').informant({ message: "O RLY?" });

THE CAVEAT SLIDE

  • It was a quick hack.
  • Never tested in IE. Tested only in Firefox and Safari for Mac.
  • Briefly tested with multiple forms, but not thoroughly.
  • Never used in production