title: Preventing button click before timeout function finishes
body: <p>I have an application that takes a few seconds to get some data and then puts it on the screen.  I also have a back button that allows the user to basically return to the previous screen.  I want this button to be disabled while the timeout function works.  How would I go about doing this?  As I have it now, the button still works, even while the information is being gathered.  Here's what I have.</p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$("#areas").on("change", function(){
      setTimeout(function(){
          $("#back").on("click", function(event){
          $(this).disabled = true;
      }, 3000)
  })
  </code></pre>