title: Bind a function to all text input - jQuery
body: <p>I want to bind a function to all the textarea and want to run it whenever a key gets pressed. </p>
  
  <pre><code>function fx(docid)
  {
    $('#'+docid).val=encodeURIComponent($('#'+docid).val());
    //document.getElementByID('docid').value = encodeURIComponent(document.getElementByID('docid').value);
  }
  </code></pre>
  
  <p>Note: the page will have different textarea, I want a single function to do the same job for all the textarea. I don't want to hard code the event with the textarea <code>&lt;textarea onkeydown="..." /&gt;</code></p>
  
  <p><code>Edit</code><br>
  I want to trigger the function on multiple events, thats on keypress, keydown,click</p>