Pass parameters to function call in event trigger
<p>Right now I have this</p>

<pre><code>jQuery('.widget-prop').keyup(function() {
    var prop = jQuery(this).attr('id');
    var val = jQuery(this).val();

    stuff;
}
</code></pre>

<p>and </p>

<pre><code>jQuery('.widget-prop').click(function() {
    var prop = jQuery(this).attr('id');
    var val = jQuery(this).val();

    stuff;
}
</code></pre>

<p>two functions are the same, so I'd like to simplify it by defining external function and calling it with </p>

<pre><code>jQuery('.widget-prop').click('myFunction');
</code></pre>

<p>but how would I pass parameters to myFunction?</p>

<pre><code>function myFunction(element) {
    stuff;
}
</code></pre>

<p>Thanks</p>
