Call function from another jQuery
<pre><code>    $(document).keydown(function(e){
        if (e.keyCode == 37) { 
            return false;
        }
    });

    $(".direction").click(function() {
        var direction = $(this).text();
</code></pre>

<p>When I click on a button with .direction class the second function above is called. When the left key is pressed I want to call the <code>$(".direction").click(function() {</code> But with a value (Instead of the var direction = $(this).text(); part) It would be var direction = value passed to function; </p>

<p>How can I do that?</p>
