Skip to content

Instantly share code, notes, and snippets.

@okonet
Created July 2, 2010 12:40
Show Gist options
  • Save okonet/461301 to your computer and use it in GitHub Desktop.
Save okonet/461301 to your computer and use it in GitHub Desktop.
var theEvent = document.createEvent('MouseEvents');
theEvent.initMouseEvent("click", true, true, document.defaultView, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, null);
element.dispatchEvent(theEvent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment