jQuery: How to bind the same action on two different events?
<p>I find myself writing code that looks something like this:</p>

<pre><code>$(document).ready(function(){

    updateStuff();

    $('select').change(function(){
        updateStuff();
    });
});

function updateStuff(){
    //do something simple
}
</code></pre>

<p>The same function <code>updateStuff()</code> is called twice (once for each event), but nothing is different between the two events. I am wondering if there is a better way to write this so that the same code is called on both events, and I can dry up my code even more. That way, I won't need to create this function in the first place.</p>

<p>Maybe something like this (if such a syntax exists)?</p>

<pre><code>$('select').bind(['document.ready', 'change'], function(){
    //do something simple
});
</code></pre>
