title: jQuery setTimeout() Function
body: <p>I am new to JS and facing some challenges which may seem simple.</p>
  
  <p>what i want to do is:</p>
  
  <ol>
  <li>a user clicks on a button that states 'submit'</li>
  <li>when the button is clicked the word 'submit' changes to 'please wait...' &amp; button is disabled</li>
  <li>the button is disabled for 2 seconds </li>
  <li>after 2 seconds the word 'please submit..' changes back to 'submit' &amp; the button becomes activated (its no longer disabled)</li>
  </ol>
  
  <p>i have written the below code. Any advise on this would be much appreciated</p>
  
  <p>html</p>
  
  <pre><code>&lt;form action="#" method="post"&gt;
      &lt;input type="button" name="submit" value="Submit" class="submit_wide" id="myBtn" &gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>javascript</p>
  
  <pre><code>$(".submit_wide").click(function () {
      $(this).val('Please wait..');
      $(this).attr('disabled', true);
      setTimeout(function() { 
          $(this).attr('disabled', false);
          $(this).val('Submit');
      }, 2000);
  });
  </code></pre>