Jquery event chaining
<p>Based on this <a href="http://stackoverflow.com/questions/451491/what-is-the-best-way-to-emulate-an-html-input-maxlength-attribute-on-an-html-text">question</a></p>

<p>I don't want to litter my ready stuff waiting for a "click event" AND a "change event" AND a "mouseover event"  I want to have all that stuff in a single function or event.</p>

<p>Is is possible to chain the events together.  I want to capture not only a keyup, but also a click or a change in case the user isn't on the keyboard.</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
$(document).ready( function () {
    setMaxLength();
    $("textarea.checkMax").keyup(function(){ checkMaxLength(this.id); } );
    $("textarea.checkMax").mouseover(function(){ checkMaxLength(this.id); } );
});
&lt;/script&gt;
</code></pre>

<p>This works</p>

<pre><code>$(document).ready( function () {
    setMaxLength(); 
    $("textarea.checkMax").bind("click mouseover keyup change", function(){checkMaxLength(this.id); } )
});
</code></pre>
