How to trigger mouse right click programmatically using javascript or jQuery -
i need trigger mouse right click using javascript or jquery. here tried below code not working me
<div id="testing" style="height:500px;width:1000px;background-color:lime;"></div> <script> $(document).ready(function () { $('#testing').contextmenu(); //or $('#testing').trigger({ type: 'mousedown', which: 3 }); }); </script>
can please provide information on this.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <div id="testing" style="height:500px;width:1000px;background-color:lime;"></div> <script> $(document).ready(function () { $("#testing" ).contextmenu(function() { alert( "right clicked" ); }); }); </script>
Comments
Post a Comment