title: jQuery - wait until function execution is complete
body: <p>Given the following code:</p>
  
  <pre><code>$(classeDoFlipContainer).css('z-index', '1');
  $(classeOpostaDoFlipContainer).css('z-index', '0');
  
  flipBox.flippy({
      color_target: "white",
      duration: "900",
      verso: versoDaImagem,
      direction: "BOTTOM",
      onFinish: setEventHandlers,
      onReverseFinish: setEventHandlers
  });
  
  alert('?');
  $(classeDoFlipContainer).css('z-index', '0');
  $(classeOpostaDoFlipContainer).css('z-index', '1');
  </code></pre>
  
  <p>I added the <code>alert('?');</code> just to verify that the code after <code>flippy()</code> is being executed. But I need it only when <code>flippy()</code> is completely done. How can I achieve this?</p>