Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9178463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:33:28+00:00 2026-06-17T17:33:28+00:00

So I have an element that looks like this: ____________________________________ / \ | |

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:33:29+00:00Added an answer on June 17, 2026 at 5:33 pm

    You have to access like this.

    e.touches[0].clientX/clientY.
    

    the number touchs and touch information can be access via e.touches.

    Take look at this FAQ.

    How to get the x/y coordinates in touch events ?

    here is the touch event documentation.

    By the way, events will return x/y coordinates relative to the window only. we can’t changed that. what you can do this. top= 0 - element.top; x= clientx-top.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an anchor element that looks like this <a href=url><img src=imgurl/>Text</a> I would
I have some data in an XML element that looks like this: <?xml version=1.0
I have a list of lists that looks like this: x[[state]][[year]] . Each element
I have a messy html that looks like this: <div id=:0.page.0 class=page-element style=width: 1620px;>
I have an XML document that looks like this <Elements> <Element> <DisplayName /> <Type
I have an XML Schema that looks like this: <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema> <xs:element name=root> <xs:complexType>
I have an element that looks something like this: ___ | X| ‾‾‾ So
I have an li element that looks like this: <ol id=selectbox> <li class=boxes name=bears>bees</li>
I have a plugin that looks like this: (function($) { $.fn.plugin_name = function(options) {
I have an XML element that looks something like this: <content locale=en> </content> The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.