detect character before the cursor after keyup in textarea
<p>I am trying to implement tagging just like what facebook does with @friendname. I have a textarea and I wanted to detect when a user typed in @. How do I do so using a keyup listener? Is it possible to get the entered text using keyup? Here's what I have now</p>

<pre><code>$("#recommendTextArea").keyup(function () {
        var content = $(this).val(); //content Box Data
        var go = content.match(start); //content Matching @
        var name = content.match(word); //content Matching @friendname

        console.log(content[content.length-1]);
        //If @ available
        if(go.length &gt; 0)
        {
            //if @abc avalable
            if(name.length &gt; 0)
            {
               //do something here
            }
        }
    });
</code></pre>

<p>Most importantly what I need is the index of the'@' that the user just entered.</p>
