How to pass jquery object and to be called as $(this) in a function?
<p>I got a function, that can be clicked from button or pressed from "Enter" key down from inputs. </p>

<p>please see code below</p>

<pre><code>function submit(){
   var tr = obj.closest('tr');
   var some_id = tr.attr('some_id');
}


$(document).ready(function(){

    $('#somebutton').click(submit);
    $('#some_text_input').live('keydown', function(event){
        if (event.keyCode==13) {
            submit($(this));
         }
    });
});
</code></pre>

<p><strong>Question is How can I call function "submit" and pass an object in to the function which I can call that object as $(this)</strong></p>

<p>Thanks for your help</p>
