Title: Close Modal script
Last modified: August 21, 2016

---

# Close Modal script

 *  Resolved [e-factor](https://wordpress.org/support/users/e-factor/)
 * (@e-factor)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/)
 * Hello, I’d need a script to close the Modal by clicking on a link or a button….(
   the function will be called after another that grabs some values from a list 
   of checkboxes)
 * I’m pretty sure that this one was working before I’ve updated to 2.2 version.
   Any clue?
 *     ```
       function closewindow() {
       $('#eModal-Container').fadeOut().remove();
       $('#eModal-Overlay').fadeOut().remove();
       return false;
       }
       ```
   
 * regards,
    f
 * [http://wordpress.org/plugins/easy-modal/](http://wordpress.org/plugins/easy-modal/)

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

 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/#post-4120329)
 * Sorry for the issues. The latest version made some big changes in how everything
   worked. The new method for closing a modal is like this assuming your working
   with eModal-1
 *     ```
       jQuery('#eModal-1').emodal('close');
       ```
   
 * Hope this helps. You can also open them programatically if needed via `.emodal('
   open')`
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/#post-4120332)
 * PS. No need to close the overlay this will be done with the command above.
 * If you don’t have any further issues please take a moment to rate and review 
   the plugin here [http://wordpress.org/support/view/plugin-reviews/easy-modal](http://wordpress.org/support/view/plugin-reviews/easy-modal)
 *  Thread Starter [e-factor](https://wordpress.org/support/users/e-factor/)
 * (@e-factor)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/#post-4120384)
 * Worked like a charm.
    Thanks.
 *  Plugin Author [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * (@danieliser)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/#post-4120413)
 * Not a problem. Glad you got it fixed.

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

The topic ‘Close Modal script’ is closed to new replies.

 * ![](https://ps.w.org/easy-modal/assets/icon-256x256.png?rev=982657)
 * [Easy Modal](https://wordpress.org/plugins/easy-modal/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-modal/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-modal/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-modal/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-modal/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-modal/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Daniel Iser](https://wordpress.org/support/users/danieliser/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/close-modal-script/#post-4120413)
 * Status: resolved