title: how to call function after timeout function is done?
body: <p>I have a function with a timer, I want to call another function when the timer of the another function is done, so the first function will show a modal for 3 seconds, and the another funciton will show another modal, here is my code:</p>
  
  <pre><code>var fn = setTimeout(function(){
      $('#responseModal').modal('hide');
      return true;
  }, 3000);
  
  if(fn)
  
      $('#requestModal').modal('show');
  </code></pre>