title: Insert prioritized on-click function?
body: <p>I have a button which has : </p>
  
  <ul>
  <li>Inline <code>onclick</code></li>
  <li>3 attached click handlers : </li>
  </ul>
  
  <p>Example</p>
  
  <pre><code>&lt;input id='b1' type='button' value='go' onclick='alert("0")';'/&gt;
  $("#b1").on('click',function (){alert('1');});
  $("#b1").on('click',function (){alert('2');});
  $("#b1").on('click',function (){alert('3');});
  </code></pre>
  
  <p>It alerts 0,1,2,3.</p>
  
  <p>But How can I insert new <code>onclick</code> at "custom index"  ?</p>
  
  <p>For example  , Lets say that there is a function which I want to insert between the alerts of 1,2 .</p>
  
  <p>How can I do that ? </p>
  
  <p>p.s :</p>
  
  <p><em>Controlling the inline <code>onclick</code> is not a problem  , I just take its <code>attr</code> and execute it later.
  The problem for me is the <code>.on</code> registers. I thought about <code>$.data("events")</code> But it ws deprecated and should be used only for debug proposes. ( also - it's syntax has changed).</em></p>
  
  <p><strong><a href="http://jsbin.com/UsuRanAR/2" rel="nofollow">JSBIN</a></strong></p>