jQuery: how to select the text in a text input
<p>I'm trying to create a button linked to a text field that will let me select all the text in a textarea so the user can copy it to the clipboard.  I've tried this:</p>

<pre><code>$('#selectCode').click(function() {
     var input = $('#MyTextBox');
     input.focus();
     input.select();
});
</code></pre>

<p>based on several examples I found online where you focus on the input and then select it.  But this doesn't seem to work in jQuery -- at least the way I'm doing it.  Can someone help?</p>
