jquery function for 2 events
<p>In the following jquery, it works when I finish typing a value (keyup) in a textbox:-</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(function(){
    var minTenderNum;
    $("#tenmoney").keyup(function(){
        var minTenderMoney = $(this).val();
        if(minTenderMoney &lt;=1000)
            minTenderNum = 3;
        else if(minTenderMoney &gt; 1000)
            minTenderNum = 5;

        $('#sunum').children().remove().end();
        maxTenderNum = minTenderNum + 4;
        for(var i=minTenderNum;i &lt;=maxTenderNum;i++)
        $('#sunum').append(new Option(i, i, true, true));

        $("#uniform-sunum&gt;span").html('');
    });
});
&lt;/script&gt;
     &lt;select id="sunum" name="sunum"&gt;
     &lt;/select&gt;
</code></pre>

<p>sometimes, a value already exists when the page is onload, but I have to modify the value and "key up" so that the function starts again.</p>

<p>If I wish to include an event for on load, how shall I modify the function? Thanks!</p>
