Skip to content

Instantly share code, notes, and snippets.

@johnmurch
Last active September 15, 2016 17:45
Show Gist options
  • Save johnmurch/6fcd4a1fb597a1d44a020f969d8888d3 to your computer and use it in GitHub Desktop.
Save johnmurch/6fcd4a1fb597a1d44a020f969d8888d3 to your computer and use it in GitHub Desktop.
JS Scripts on closing modals - WIP
(function () {
var el = document.elementFromPoint(500, 100);
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 1, 1, false, false, false, false, 0, null);
el.dispatchEvent(evt);
});
document.getElementsByClassName('om-close')[0].click()
document.getElementsByClassName('sumome-popup-close')[0].click()
document.getElementsByClassName('sumome-smartbar-close')[0].click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment