title: Delaying the display message in jQuery
body: <p>I have a button, which shows a message through jQuery on click. Now, the message disappears immediately, and the button comes back again. I want to show the message for some time before displaying the button again. I am new to jQuery, and I tried with some options like <code>delay()</code> and <code>setTimeout()</code>, but have been unable to get the exact script to make it happen.</p>
  
  <p>Here is my existing code:</p>
  
  <pre><code>$('#id1').click(function() {
    $('#id2').html('&lt;p&gt;A code has been sent to your email&lt;/p&gt;');
  });
  </code></pre>
  
  <p>The .ftl is as below:</p>
  
  <pre><code>    &lt;#if !(obj)?has_content&gt;
      &lt;div class="cls" id="id1"&gt;
        &lt;a href="/link?email=${email}" id="id2"&gt;Send Token&lt;/a&gt;
      &lt;/div&gt;
     &lt;/#if&gt;
  </code></pre>
  
  <p>Can you please advise me on the code I need to make this happen?</p>