Epicmodals
Modals is included with php, so find its file is located in /scripts/supermodals.js. Content for modal examples located in /modals/. Script for calling supermodals located at the bottom of this file.
Below, the Default and Classic examples uses the same modal content, but pass different visual styles to modal container.
The button below launches a different modal in it's own unique theme.
<!-- Calls the default template -->
<button type="button" class="button button_color-default" onclick="openDefault();">
Default Template
<!-- icon... -->
</button>
<!-- Add custom templates to _custom.scss or custom folder in scss/, and to template section in epicmodals.php -->
<button type="button" class="button button_color-theme" onclick="openNitro();">
Nitro Template
<!-- icon... -->
</button>
Authorship
Epicmodals and it's ancestor Supermodals were a collaborative effort between two developers, but the bulk of the credit for the underlying JavaScript goes to Bobbie Jean Gustafson.
// calls to epicmodals can include options, like fadeIn, timers, templates, max-width, and more
// can get and post data
function openDefault()
{
$.get('<path to modal content>', function(data){
supermodal.fadeIn({content: data});
});
}
function openNitro()
{
$.get('<path to modal content>', function(data){
supermodal.fadeIn({content: data, template: 'nitro'});
});
}
Image Credit
Photo in the modals by Vincentiu Solomon on Unsplash .