Simplest Responsive Modal/Dialog Box Plugin With jQuery - Easy Modal

Simplest Responsive Modal/Dialog Box Plugin With jQuery - Easy Modal
File Size: 7.68 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A minimalist jQuery modal plugin for displaying a responsive modal window / dialog box with configurable sizes and animations on the page. Smooth animations based on CSS3 transitions.

How to use it:

1. Include the stylesheet style-modal.css in the head section of the webpage, which will provide the basic styles and CSS3 animations for the modal window.

<link href="css/style-modal.css" rel="stylesheet">

2. Include jQuery library and the jQuery Easy Modal plugin's JavaScript file style-modal.js at the end of the webpage.

<script src="/path/to/jquery.min.js"></script>
<script src="/path/to/easy-modal.js"></script>

3. Display a basic modal with default options on the webpage.

$.easyModal()

4. Insert your own content to the modal.

$.easyModal({
  content: '<h2>This is a modal</h2>',
})

5. Adjust the size of the modal.

$.easyModal({

  // small, large, medium and full
  size: 'medium',
  
})

6. Override the default entrance/exit animations speed.

$.easyModal({

  fadeInModal: 800,
  fadeOutModal: 800,

})

7. Display a footer with 'ok' and 'cancel' buttons inside the modal.

$.easyModal({

  footer: true,
  buttonText: "Ok",
  linkText: "Cancel"

})

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