I'm setting up a table, formatted like this.. Please forgive the silly sample data. All of this is actually loaded with json, but the output looks like this:
<table id="famequotes">
<tr><td id="par001">It was the best of times, it was the worst of times.</td></tr>
<tr><td id="par002">Two things are infinite: the universe and human stupidity; and I'm not sure about the universe</td></tr>
<tr><td id="par003">In the jungle, the mighty jungle, the lion sleeps tonight...</td></tr>
</table>
Using mousedown on $("#famequotes td"), and mouseup, I can allow users to highlight text and capture the start and end row, and similarly capture all the rows in between with onmouseover.
What I want to do is capture the SelStart of the start row (the table cell I started highlighting from) and the sel...stop of the last row.
I have not been able to find an answer, though I have researched and google searched already.
MIchal Hainc's answer is really cool, but not what I am seeking.
I can see how the selection box could be useful, and I would love to incorporate it.
However, what I'm actually seeking is so that if the user highlights text as I've highlighted in http://jsfiddle.net/vhyyzeog/1/ it would return 3 for selStart and 12 for selEnd. I'm already tracking the first highlighted row, and the last, so I know what rows to apply selstart and selend to.
Thank you for any help.