jQuery Plugin For Confirmation on Leaving the Current Page - confirmExit

jQuery Plugin For Confirmation on Leaving the Current Page - confirmExit
File Size: 5.85KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

confirmExit is a lightweight yet useful jQuery plugin that will make a customizable modal confirm box when someone try's to exit the current page with unsaved changes.

See also:

Basic Usage:

1. Include jQuery javascript library and jquery.confirmExit.js script on the page

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="jquery.confirmExit.js"></script>

2. Create an html form using html5 input type

<form id="demo" action="">

<input type="number" />

<input type="password" />

</form>

3. Call the plugin with options

<script>
$(document).ready(function () {
$('#demo').confirmExit('YOUR CONFIRM TEXT');
});
</script>

This awesome jQuery plugin is developed by dunglas. For more Advanced Usages, please check the demo page or visit the official website.