title: Double event handler and one function. How to prevent executing code twice?
body: <p>I have one callback function bound to two events (<code>change</code> and <code>focusout</code>). However, I need the <code>focusout</code> to happen only when the element we're interacting with is not a <code>checkbox</code>.</p>
  <p>This is the example code:</p>
  <pre><code>$(document).on('focusout change', '.selector', function() {
      if ($(this).is(':checkbox')) {
          // Do stuff and prevent the focusout to trigger. HOW???
      }
  
      doStuff(); // Action that applies to both cases, but needs to be limited at one execution only
  });
  </code></pre>
  <p>The code above will execute twice:</p>
  <ul>
  <li>When the checkbox gets checked/unchecked</li>
  <li>When you click outside of the checkbox (lose focus (blur))</li>
  </ul>
  <p>I tried using <code>.off</code>, but it ends up killing the <code>focousout</code> handler altogether, which I will need later for other elements which aren't checkboxes.</p>
  <p>What would be the way to prevent the <code>focusout</code> handler to trigger for certain elements?</p>