
Use this jQuery code snippet to distinguish between a human click and an automated click.
1 2 3 4 5 6 |
//perform function when element is clicked by user (will not fire by script-generated clicks) jQuery(".yourelement").click(function(e){ if(e.hasOwnProperty('originalEvent')) { //this is a user generated event //do stuff } }); |