mercredi 20 avril 2016

"Check" Multiple Checkboxes With Click & Drag?

I have a table filled with checkboxes like so:

enter image description here

I'd like to be able to keep my mouse held down and drag to activate multiple checkboxes. I don't have the slightest clue where to start with this :/ I searched for an answer, but only found another thread of someone asking how to do it, but with no answers.

HTML:

<table>
  <tbody>
    <tr>
      <td><input type="checkbox"></td>
      <td><input type="checkbox"></td>
      <td><input type="checkbox"></td>
    </tr>
    <!-- Repeat tr 2x -->
  </tbody>
</table>

jsFiddle: http://ift.tt/1r0ClRK

Also, I'd prefer to keep the <input type="checkbox"> model because reworking my system would be time consuming, but I'm open to other options if this isn't possible. Any help will be greatly appreciated!




Aucun commentaire:

Enregistrer un commentaire