0

When a user selects multiple td elements across rows in my table I'd like a way to figure out what elements have been selected and then proceed to get the tr of all the selected table cells.

How can I do this? I'm using jquery.

  • Can you provide a code sample of what you've already tried? – quoo Jan 15 '14 at 15:27
  • 1
    http://stackoverflow.com/a/7784176/96100 for a DOM range. Get the selected range using `window.getSelection().getRangeAt(0)`, except in IE <= 8. – Tim Down Jan 15 '14 at 15:29
  • @TimDown: Thanks. From that and a search to find unique elements in an array I have the solution. Now to implement it outside of a live debugger =D. You should make it an answer –  Jan 15 '14 at 15:41

0 Answers0