JSFiddle - React, Tailwind, and code Playground

HTML

<input id="expandButton" type="submit" value="Expand" class="loadWindow"/>

JavaScript

function confirmContinue() {
     return confirm("Do you want to expand window, might reload some information?");
}

$("#expandButton").on( "click",function(event) {
     var result = confirmContinue();
    //alert(result);
     if (!result) {
          event.preventDefault();
         //event.stopPropagation();
         event.stopImmediatePropagation();        
     }
});


$("input.loadWindow").on( "click",function(event) {
      alert('input.loadWindow triggered');
});