Title: Close modal on SCROLL ?
Last modified: January 29, 2019

---

# Close modal on SCROLL ?

 *  Resolved [morzar](https://wordpress.org/support/users/morzar/)
 * (@morzar)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/close-modal-on-scroll/)
 * Hi peeps,
 * thanks for this fantastic plugin, It’s really great and It works well.
 * I’m using it in a digital branding project. A popup shows on the homepage, which
   people can close by clicking it.
 * Because people are using a tablet, I also would like the modal to close ON SCROLL
   instead of ON CLICK.
 * Any idea how to achieve that? I’ve not seen that feature, even in the paid plugins.
 * Anyway, if I could write something in functions.php it would be great!
 * Thanks again 😉

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

 *  Thread Starter [morzar](https://wordpress.org/support/users/morzar/)
 * (@morzar)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/close-modal-on-scroll/#post-11143641)
 * OK I found a way to do it myself, in JS:
 *     ```
       jQuery(function(){
       		jQuery( window ).scroll(function() {
       			jQuery( "#popmake-ID" ).popmake('close');
       		});
       });
       ```
   
 * #popmake-ID being the ID of the popup you want to close on scroll.
    -  This reply was modified 7 years, 5 months ago by [morzar](https://wordpress.org/support/users/morzar/).
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/close-modal-on-scroll/#post-11147239)
 * [@morzar](https://wordpress.org/support/users/morzar/) – Nailed it, great initiative,
   wish more of our user were even brave enough to try their hand at a custom code
   solution before hearing from us ;).
 * That said here are some improvements based on our latest API functions. Also 
   your wrapper isn’t neccessary. The window element already exists prior to document
   ready which is what the wrapper jQuery(function () {}); does.
 * \`
    jQuery( window ).scroll(function() { PUM.close(ID); }); `
 * Hope that helps. If your issue is resolved please take a moment to [rate and review the plugin](https://wordpress.org/support/plugin/popup-maker/reviews/?rate=5#rate-response)
   or support.
 * If you still need help please message us directly at [https://wppopupmaker.com/support/](https://wppopupmaker.com/support/).

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

The topic ‘Close modal on SCROLL ?’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/close-modal-on-scroll/#post-11147239)
 * Status: resolved