So I have an element that looks like this:
____________________________________
/
| |
| |
+------------------------------------+
| |
| |
| |
+------------------------------------+
| |
| |
____________________________________/
I have attached a touchstart listener to it, like this:
other_options.addEventListener('touchstart', function(e) {
event.preventDefault();
}, false);
What I want to do, and I've already looked through the values of 'e' but I can't find any value consistent enough (values don't seem right to me when I try them) to do what I want.
I know the size of those rows. I just want to be able to take the Y coordinate of where the touchstart event fired, being 0 the upper coordinate of the element. That way, Math.floor(y / ROW_SIZE) will give me the row the touchstart event was started on.