jQuery Inserting Text into a Textarea at the Cursor Position
<p>I've seen this example floating around on how to insert text at the cursor in a text area:</p>

<p><a href="http://jsfiddle.net/adamadam123/bTUWa/5/" rel="nofollow">http://jsfiddle.net/adamadam123/bTUWa/5/</a></p>

<p>The above works fine but when I've tried to add it to my own code (which is primarily jQuery) I find I can't get it to work anymore - below is an example of my code trying to use the function:</p>

<p><a href="http://jsfiddle.net/adamadam123/bbE48/6/" rel="nofollow">http://jsfiddle.net/adamadam123/bbE48/6/</a></p>

<p>Can someone help me get the second jsfiddle working. Note: really want to pass the ID across as there are many div's with different ID's but all have the same textarea.classname within.</p>

<p>thankyou</p>

<pre><code>&lt;div id="100000000"&gt;
  &lt;input id="insertPattern" type="button" value="insert pattern" /&gt;
  &lt;textarea class="chatMessengerFooterTextArea"&gt;insert some text into this string&lt;/textarea&gt;
&lt;/div&gt;​
</code></pre>
