This is probably a really simple jQuery question, but I couldn't answer it after 10 minutes in the documentation so...
I have a list of checkboxes, and I can get them with the selector 'input[type=checkbox]'
. I want the user to be able to shift-click and select a range of checkboxes. To accomplish this, I need to get the index of a checkbox in the list, so I can pass that index to .slice(start, end)
. How do I get the index when the user clicks a box?