I want to differentiate actual mouse clicks fro开发者_开发百科m script generated clicks.How can i do it with jquery?
You could check for something that isn't included in a triggered event object.
$('div').click(function(e) {
if ( e.originalEvent ) {
console.log('actual mouseclick');
}
}).trigger('click');
精彩评论