jquery inserting text to textarea after X characters
<pre><code>    var currentposition = 10; // after 10 characters
    var text = ":)";

    $(".insert").click(function () {
           // Need help here
    });

&lt;textarea id="messagebox"&gt;Example text for the code&lt;/textarea&gt;
</code></pre>

<p>How can I insert text in a textarea after a certain amount of characters (there is text in the textarea), in this case 10. There also may not be any text in the textarea at all, in which case currentposition will be 0.</p>

<p>The purpose of this code is to enter smileys at the current cursor position. </p>
