Skip to content

Instantly share code, notes, and snippets.

@gavinblair
Created April 16, 2012 15:13
Show Gist options
  • Save gavinblair/2399383 to your computer and use it in GitHub Desktop.
Save gavinblair/2399383 to your computer and use it in GitHub Desktop.
difference between simulated click and actual click
setInterval(function(){
$("#mybutton").click();
}, 1000);
$("#mybutton").click(function(e){
if(e.originalEvent === undefined) {
//Interval!
} else {
//Actual click!
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment