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

Dynamic loaded form #145

Open WebstonesNL opened 4 years ago

WebstonesNL commented 4 years ago

How could I get AreYourSure to work on dynamic loaded forms? So not dynamic loaded form elements, but a complete dynamic loaded form.

I tried:

$("body").on("change keyup", "form", function() { $(this).areYouSure(); })

but that does not work.

Any help is welcome!

leo-rp commented 3 years ago

A little late but my "areYouSure_live" could help to You : https://github.com/codedance/jquery.AreYouSure/pull/130/commits/e80e1ab7e8afcfb330e58251c55f8890e5606203 @WebstonesNL