codedance / jquery.AreYouSure

A light-weight jQuery "dirty forms" Plugin - it monitors html forms and alerts users to unsaved changes if they attempt to close the browser or navigate away from the page. (Are you sure?)
508 stars 145 forks source link

plugin does not detect changes on text input or dropdown dynamically added #101

Open fahadabdullah opened 8 years ago

fahadabdullah commented 8 years ago

I am adding whole bunch of input and drop down on button click , it should detect change on them or when they are added it should show form dirty

nenad commented 8 years ago

If you're dynamically adding new fields/inputs, and would like to track their state, trigger Are-You-Sure to rescan the form like this:

$('#my-form').trigger('rescan.areYouSure');