JSFiddle - React, Tailwind, and code Playground

HTML

<h1>Hello</h1>
<div class="sound">Right click here</div>

JavaScript

$(document).ready(function(){ 
  $(".sound").mousedown(Play_Sound);
  document.oncontextmenu = function() {return false;};
  $(document).mousedown(function(){ 
	if( event.which == 3 ) {
		Cancel_Playback();
      return false; 
    } 
    return true; 
  }); 
})

function Cancel_Playback() {
    alert("This is all that should be displayed on right-mousedown")
}

function Play_Sound() {
    alert("Display this on left-mousedown... but not on right-mousedown")
}