The dirtyFields plugin was born out of the need to make a user aware that they had unsaved values on an HTML form.
It seems like a simple task at first: it’s easy to use jQuery to bind an event to a text input or a <textarea> such that, when a change is made to the value, the text element is styled to look visually different (like changing the border color). But you can’t do that with <select> drop-downs, checkboxes, or radio buttons.
This plugin gets around that problem by letting you apply whatever CSS class you want to use to indicate that a field has been changed to a contextually-related element, like a <label> element for the field, or an adjacent <span> or <div>, or any element you somehow associate with that form field: the plugin options give you complete control over what gets styled to indicate a field has been changed/made "dirty".
dirtyFields also gives you the option to apply a style to a container element (a <form>, a <div> containing multiple forms, whatever) that indicates that the form is dirty whenver one or more of the form field elements within the container is dirty. This option comes in handy when you want a more noticable indicator that the user needs to save the form to perserve their changes or when not all of the form fields are visible on a single screen.
Finally, there are callback functions incorporated into the plugin that let you execute your own functions before or after the plugin routine that determines if a field has changed and after the plugin routine that determines if the form/form field container is dirty or not.