lavoiesl / jQuery-TrackChanges

TrackChanges enables to easily and unobtrusively add watches on forms and warn a user of unsaved changes on window.unload

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jQuery TrackChanges

Author

SĂ©bastien Lavoie (sebastien@lavoie.sl)

Description

TrackChanges enables to easily and unobtrusively add watches on forms, detect changes and revert to original value

Example

$('.myform :input').trackChanges({
    trackingClass: 'track-changes', // Class added on watched fields
    changedClass: 'changed', // Class added when field is changed
    events: 'change blur' // Events to bind for watching changes
});

Prerequisites

  • jQuery, should work with any version but tested with 1.7

Live demo

Here is a live demo, please fork it to report bugs. http://jsfiddle.net/547cM/3/

About

TrackChanges enables to easily and unobtrusively add watches on forms and warn a user of unsaved changes on window.unload


Languages

Language:JavaScript 100.0%