how to get selection inside a div using jquery/javascript
<p>there are lots of code to get selection in a page,
but i want a code to get selection inside a div,
if the selection is outside of my div, the function must return empty string;</p>

<p>there is a jquery plugin that works only for textarea but not div. <a href="http://plugins.jquery.com/project/fieldselection" rel="nofollow">(here)</a></p>

<p>thanks</p>
