Inline/Ajax Modal Popup Plugin - jQuery Sunrise

Inline/Ajax Modal Popup Plugin - jQuery Sunrise

Sunrise is a small jQuery modal plugin used for creating smoothly animated popup boxes from inline and/or AJAX contents.

1. To use the modal plugin, include jQuery and the jQuery Sunrise plugin's JavaScript & Stylesheet on the html page.

<link rel="stylesheet" href="sunrise.css"></link>
<script src="" 
<script src="sunrise.js"></script>

2. Create a static modal popup from inline content within the document.

<div id="sunrise-content" style="display: none;">
  <p>Modal Content Here</p>
  target: '#sunrise-content'

3. Create a dynamic modal popup from an external webpage using AJAX requests.

<!-- ajax.html -->
<div id="sunrise">
  <p>Ajax Content Here</p>
  target: 'ajax.html',
  ajax: true

4. Execute functions when the modal popup is opened and closed.

  openCallback: function (target) {
    console.log('open', target);
  closeCallback: function (target) {
    console.log('close', target);

5. Close the modal popup manually.


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

  • Publication date: 13.04.2019
  • Source