Bind a function to all text input - jQuery
<p>i want to bind a function to all the textarea and want to run it whenever a key get 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 funtion to do the same job for all the textarea. i dont 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>
