Hello there,
Does anybody know how to make div's in a td selectable?
Usually you do it like this:
- <ul id="selectable">
- <li>List item</li>
- <li>List item</li>
- <li>List item</li>
- </ul>
- <script>
- $('#selectable').selectable();
- </script>
The previous code makes the children of UL selectable. But what if you want to make the div's of a TD selectable?
- <table>
- <tr>
- <td><div class="tdItem">Hello</td>
- <td><div class="tdItem">Hello</td>
- <td><div class="tdItem">Hello</td>
- </tr>
- <tr>
- <td><div class="tdItem">Hello</td>
- <td><div class="tdItem">Hello</td>
- <td><div class="tdItem">Hello</td>
- </tr>
- </table>
I have tried:
- <script>
- $('td').selectable();
- </script>
But this makes the div separately selectable. So you can select them, but separated from each other. They are in fact independent selectables.
Does anybody know a good solution? :-)
Thanks!
Christophe