Great Questions. Although not documented and never asked for there is a fully functional standalone jQuery plugin written behind the scenes. the .popmake() function has many methods and options.
Everything was built to be extended, custom/extra animations, extended themeing, even our analytics hooks in via events to the open and close of a popup.
That said here are the basics which I will put as the start of a documentation.
General Information: Each popup is initialized separately already during page load. The following methods are used by using the popups id for the selector. All examples use ID #1.
Methods
Open a popup, with optional callback function:
jQuery('#popmake-1').popmake('open', callback);
Close a popup:
jQuery('#popmake-1').popmake('close');
Reposition a popup to its starting location in the window, with optional callback function:
jQuery('#popmake-1').popmake('reposition', callback);
Retheme a popup, with optional theme argument override.
jQuery('#popmake-1').popmake('retheme', theme);
Animate a popup with style and optional callback:
jQuery('#popmake-1').popmake('animate', style, callback);
Access Settings
settings = jQuery('#popmake-1').data('popmake'); // Or if in one of our events you can use this.data('popmake');
// All admin settings are stored in the meta key.
settings.id; // The id of the popup. Useful for checking if a certain popup is loading to attach settings.
settings.meta.close; // Contains all the close settings.
settings.meta.display // Contains all display settings.
settings.meta.close.esc_press; // Whether Esc Press is checked on Close Options
settings.meta.display.size; // The selected size.
Events
popmakeInit: Runs when the popups are first initilized. Useful for checking settings and adding extra functionality, runs just after document.ready
popmakeBeforeOpen: Runs just before the popup is shown.
popmakeAfterOpen: Runs just after the popup is shown.
popmakeBeforeClose: Runs just before the popup is closed.
popmakeAfterClose: Runs just after the popup is closed.
popmakeBeforeReposition: Runs before re positioning the popup. Useful to change the position settings before it is moved.
popmakeBeforeRetheme: ARuns before re theming. Useful to change theme settings.
popmakeAfterRetheme: Accepts argument theme
which contains all theme settings. Runs after core theme. Useful for extra theme settings.
The Full code is very readable and accessible on GitHub. Fully built to be extended.
https://github.com/danieliser/Popup-Maker/blob/master/assets/scripts/popup-maker-site.js