Title: Show popup with javascript
Last modified: April 19, 2018

---

# Show popup with javascript

 *  [extralevel](https://wordpress.org/support/users/extralevel/)
 * (@extralevel)
 * [8 years ago](https://wordpress.org/support/topic/show-popup-with-javascript/)
 * Hello,
 * In your plugin there is a possibility of bringig the popup up with a link like
   [Open window](https://wordpress.org/support/topic/show-popup-with-javascript/?output_format=md#spu-16)
 * Is there the same possibility with a javascript condition?
 * We have a script that looks like
 * if ( condition ) {
    popup window gets called}
 * How can we bring up the popup this way? Thank you in advance.

Viewing 1 replies (of 1 total)

 *  Plugin Support [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * (@gonzalesc)
 * [8 years ago](https://wordpress.org/support/topic/show-popup-with-javascript/#post-10211523)
 * Hi.
 * You must use the variable global SPU.
 *     ```
       if(condition) { SPU.show('324'); }
   
       if(condition) { SPU.hide('324'); }
       ```
   
 * Where 324 is the Popup ID.

Viewing 1 replies (of 1 total)

The topic ‘Show popup with javascript’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/popups_efeef0.svg)
 * [Popups - WordPress Popup](https://wordpress.org/plugins/popups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/popups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/popups/)
 * [Active Topics](https://wordpress.org/support/plugin/popups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/popups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/popups/reviews/)

## Tags

 * [popup](https://wordpress.org/support/topic-tag/popup/)

 * 1 reply
 * 2 participants
 * Last reply from: [gonzalesc](https://wordpress.org/support/users/gonzalesc/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/show-popup-with-javascript/#post-10211523)
 * Status: not resolved