Title: JavaScript Trigger
Last modified: August 22, 2016

---

# JavaScript Trigger

 *  Resolved [Dave Bergschneider](https://wordpress.org/support/users/dave-bergschneider/)
 * (@dave-bergschneider)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/)
 * Hi,
 * First this is a great plugin.
 * I have a custom form that I built and I’m trying to invoke a pop-up on successful
   validation to confirm their selection. I know you can invoke the popup with a
   css class but I’m trying to invoke a specific popup with JavaScript. Is there
   a standard function I can use?
 * [https://wordpress.org/plugins/popup-maker/](https://wordpress.org/plugins/popup-maker/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/#post-5693602)
 * 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](https://github.com/danieliser/Popup-Maker/blob/master/assets/scripts/popup-maker-site.js)
 *  Thread Starter [Dave Bergschneider](https://wordpress.org/support/users/dave-bergschneider/)
 * (@dave-bergschneider)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/#post-5693605)
 * That’s exactly what I was looking for. Thank you very much.
 *  Thread Starter [Dave Bergschneider](https://wordpress.org/support/users/dave-bergschneider/)
 * (@dave-bergschneider)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/#post-5693606)
 * Setting as resolved.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/#post-5693607)
 * Just added this to our sites docs. [Popup Maker javascript API](https://wppopupmaker.com/docs/overview-popup-maker-javascriptjquery-api)
 * This plugin is built to be extended or stripped down any way you want. We are
   even opening our market for other developers to make and sell extensions as well.
 * Also please take a moment to [rate and review the plugin](https://wordpress.org/support/view/plugin-reviews/popup-maker)
   and or support.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘JavaScript Trigger’ is closed to new replies.

 * ![](https://ps.w.org/popup-maker/assets/icon-256x256.gif?rev=3097653)
 * [Popup Maker - Boost Sales, Conversions, Optins, Subscribers with the Ultimate WP Popup Builder](https://wordpress.org/plugins/popup-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popup-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popup-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/popup-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popup-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popup-maker/reviews/)

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [trigger](https://wordpress.org/support/topic-tag/trigger/)

 * 4 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/javascript-trigger/#post-5693607)
 * Status: resolved