Download
User Rating: 0/5 ( 0 votes)
egrModal is a Simple jQuery Modal window plugin that can be styled any way I see fit. The modal window is currently styled to be responsive, and automatically recenters itself on window resize. The modal can be closed in 3 different ways: Clicking the close (X) button on the top right, clicking on the overlay, or simply hitting the ESC key.
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" href="css/egrModal.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/plugins/jquery.egrModal.js"></script>
2. HTML
<div class="modal"> // you can use any id or class name that you want. You can also traverse the DOM to get the <div> if you don't want to use an id or class.
<h3>I'm a modal panel!</h3>
<p>Some interesting content.</p>
<p>Even more interesting content.</p>
</div> //end of the modal window
<button class="modal-open">Click here to open the Modal</button>
3. JAVASCRIPT
(function($){
$('.modal').egrModal();
}(jQuery));