Calling jquery function with a parameter when needed i.e. not on page load
<p>A very basic question...</p>

<p>I have a jquery function that fires on page load:</p>

<pre><code>$(document).ready(function () {
   // some code
   $('#filter').keyup(function() {

   });
}
</code></pre>

<p>The code filters the first column in a HTML table.  I now want to filter by the <code>nth</code> column but I don't want to write two very similar functions.</p>

<p>I can change the function to accept a single argument like so:</p>

<pre><code>$(document).ready(function (column_num) {
   // some code
   $('#filter').keyup(function() {

   });
}
</code></pre>

<p>which is fine.  However, how do I execute the function in my HTML file giving the function a single argument?</p>
