title: Making input text uneditable before making it editable again in 3 seconds using jQuery
body: <p>I have an input text, and when you press enter, it's suppose to make the input text uneditable, before making it editable again in 3 seconds. But it's not working for some reason. What am I doing wrong? Thanks.</p>
  
  <pre><code>&lt;input type = "text" id = "text"&gt;
  
  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type = "text/javascript"&gt;
  
  $(function(){
  
  $("#text").keyup(function(e){ 
      if (e.which == 13) {
      $("#text").prop("readonly", true);
      setTimeout(function(){
      $("#text").prop("readonly", false);
  }, 3000);
  
  }); //end of if (e.which == 13)
  
  }); //end of $(function())
  
  &lt;/script&gt;
  </code></pre>