title: jQuery trigger mouseup on dragging
body: <p>I want to cancel dragging by jQuery trigger <code>mouseup</code></p>
  
  <p><strong>HTML:</strong></p>
  
  <p><code>&lt;div ondragstart="drag(event)" draggable="true"&gt;&lt;/div&gt;</code></p>
  
  <p><strong>JS:</strong></p>
  
  <pre><code>$(document).ready(function(){
  
      $(document).on("mouseup","body",function(){
          exit_dragging();
      });
  
      $(document).mouseup(function(){
          alert('mouseup');
      });
  
  });
  
  function drag(event){ 
      event.preventDefault();
      $(document).trigger("mouseup"); //alert('mouseup') runs
      //.....      
  }
  </code></pre>
  
  <p>when mouse is releasing the <code>exit_dragging()</code> runs but I want to run it when <code>triggering</code>.</p>
  
  <p>sorry for my bad english </p>