title: Is it possible to trigger the onbeforeunload event programmatically?
body: <p>I'm currently using the <a href="http://code.google.com/p/jquery-form-observe/" rel="noreferrer">jquery-form-observe</a> plugin which uses onbeforeunload to prompt the user about "unsaved" changes. </p>
  
  <p>But I have a scenario where I need to trigger this on a button click: the button click ultimately leads to the page changing, but I want to prompt the user before they start the process that the button click kicks off...</p>
  
  <p>So is there a way to trigger onbeforeunload through jQuery or otherwise?</p>