Get the html (source code) index of a selection?
<p>If I have</p>

<pre><code>&lt;div&gt;
hello
&lt;/div&gt;
</code></pre>

<p>and I select 'hello' with my cursor, the start index is 6, end is 11 (inclusive).</p>

<p>Is there a way to get this information cross-browser with JavaScript or jQuery?</p>
