javascript - Jquery contextmenu event always returns e.which as 0 -
i using contextmenu bound using jquery on. , noticed e.which , e.button 0.
is there reason this?
$("div").on("contextmenu", function(e){ if(e.which) //always 0 //do }); edit: mistake happens in ie8, missed specify browser version.
you should go mousedown event works on ie8
$("div").on("mousedown", function(e){ alert(e.which); if(e.which == 3){ //do } });
Comments
Post a Comment