https://github.com/dunglas/jquery.confirmexit
jQuery confirm before exit plugin
https://github.com/dunglas/jquery.confirmexit
Last synced: about 1 month ago
JSON representation
jQuery confirm before exit plugin
- Host: GitHub
- URL: https://github.com/dunglas/jquery.confirmexit
- Owner: dunglas
- License: mit
- Created: 2012-11-21T15:39:29.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-29T20:20:53.000Z (almost 12 years ago)
- Last Synced: 2025-04-13T21:35:57.105Z (about 2 months ago)
- Language: JavaScript
- Homepage: http://dunglas.fr/2012/11/jquery-confirmexit-ou-comment-ne-plus-perdre-les-donnees-dun-formulaire-complete/
- Size: 160 KB
- Stars: 15
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jQuery confirmExit Plugin
This jQuery plugin displays a modal dialog with a message asking the user to confirm if he wants to quit a webpage with unsaved changes.
All form's controls are supported including HTML5 types.
Submitting the form will not display the confirmation dialog.
The displayed message is configurable.Internally, this plugin use the `onbeforeunload` event.
Browser Compatibility: IE 6.0+, FF 10+, Safari 5.0+, Opera, Chrome

## Usage
```js
$("#the-form").confirmExit("Your message");
```- `the-form` is the form ID (works with any method to grab your form)
- `Your message` is the message that will be displayed before the page exit## Credits
This little plugin has been written by [Kévin Dunglas](http://dunglas.fr).