How to call a function in jquery?
<p>I wanted to my code a bit cleaner so I wanted to put a very long function in it's own method.</p>

<p>Right now I have</p>

<pre><code>$('#Id').submit(function()
{
   // lots of code here
});
</code></pre>

<p>now I wanted to break it up like</p>

<pre><code>   $('#Id').submit(MyFunction);


        function MyFunction()
        {
           // code now here.
        }
</code></pre>

<p>but I need to pass in some parms into MyFunction. So I tried</p>

<pre><code>$('#Id').submit(MyFunction(param1, param2));

function MyFunction(param1, param2)
{
   // code now here.
}
</code></pre>

<p>But when I do this nothing works. Firebug shows me some huge ass error about F not being defined or something. So I am not sure what I need to do to make it work.</p>
