Title: Close when clic
Last modified: October 26, 2025

---

# Close when clic

 *  Resolved [artemi0](https://wordpress.org/support/users/artemi0/)
 * (@artemi0)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/)
 * Great job. It works great, but… (there’s always a “but”…) 
   I’ve inserted an image
   into popup, which uses an anchor go to a form in footer. I’d like the popup to
   close after clicking the image and going to the anchor area. Is this possible?

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

 *  Plugin Author [Lovro Hrust](https://wordpress.org/support/users/lovor/)
 * (@lovor)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/#post-18695721)
 * Yes, it is possible.
   Plugin uses [Micromodal.js](https://micromodal.vercel.app/)
   under the hood and you can use Micromodal to close the popup. If you add `data-
   micromodal-close` attribute to your image element (you can do so using HTML API)
   it should work. Another way would be to use javascript to attach `click` event
   to image and call Micromodal.close with modal id as parameter. However, I am 
   not sure if you can get reference to Micromodal. If you will have problems with
   that, I can modify the code to expose it on element.Take a look at the plugin
   [source code](https://github.com/Lovor01/makeiteasy-popup) for reference.
 *  Thread Starter [artemi0](https://wordpress.org/support/users/artemi0/)
 * (@artemi0)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/#post-18695727)
 * Wow! Great support!
 * I used data-micromodal-close as an attribute, and it closes the popup, but the
   link stops working.
   NAME: data-micromodal-close-popupcyl VALUE:trueTou can view
   this at link[https://inafo.es/agentes/curso-oposiciones-medioambiental-castilla-leon/](https://inafo.es/agentes/curso-oposiciones-medioambiental-castilla-leon/)
 * Thanks a lot
 *  Plugin Author [Lovro Hrust](https://wordpress.org/support/users/lovor/)
 * (@lovor)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/#post-18695732)
 * So, you want that clicking on image take you to another section of the page with
   id formulario, and closes the popup. You can do this only with javascript. You
   should use `Micromodal.close` in click event on image. If scroll still doesn’t
   work, maybe you’ll also have to call event.preventDefault() and `document.querySelector('
   <selector to your element>').scrollIntoView()` or use some different javascript
   method for scrolling to your element. Let me know if you can reach Micromodal
   in your code or I’ll have to expose it for you.
   Don’t forget to leave a review
   for plugin 🙂
 *  Thread Starter [artemi0](https://wordpress.org/support/users/artemi0/)
 * (@artemi0)
 * [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/#post-18695793)
 * Great support.
   I’ll inform my colleague. I’m not a programmer, it’s not my thing.

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

The topic ‘Close when clic’ is closed to new replies.

 * ![](https://ps.w.org/makeiteasy-popup/assets/icon.svg?rev=3221779)
 * [MakeITeasy Popup](https://wordpress.org/plugins/makeiteasy-popup/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/makeiteasy-popup/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/makeiteasy-popup/)
 * [Active Topics](https://wordpress.org/support/plugin/makeiteasy-popup/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/makeiteasy-popup/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/makeiteasy-popup/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [artemi0](https://wordpress.org/support/users/artemi0/)
 * Last activity: [7 months, 1 week ago](https://wordpress.org/support/topic/close-when-clic/#post-18695793)
 * Status: resolved