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 8470469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:31:39+00:00 2026-06-10T16:31:39+00:00

Building a web application and having trouble getting a click event to fire. It

  • 0

Building a web application and having trouble getting a click event to fire. It works perfectly when running from a normal instance of Safari, but when running from the home screen, it fails.

$("a.applink").live('click', clickHandler);
var clickHandler = function(e) {
    console.log(e);
    e.preventDefault();
}

When running from the home screen, ‘e’ is empty. If I replace ‘click’ for ‘touchend’, it does work, but touchend doesn’t give the correct behaviour (i.e. if you happen to touch a link to start a scroll, it triggers an unexpected click).

Is there a proper solution to this?

  • 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-10T16:31:41+00:00Added an answer on June 10, 2026 at 4:31 pm

    Here’s how I did it:

    Essentially, when you navigate a page you’re going to tap or scroll. (Well there are other things like pinch and slide put you can figure them out later)…

    So on a tap your ‘touchstart’ will be followed by a ‘touchend’
    On a scroll your ‘touchstart’ will be followed by a ‘touchmove’

    Using Jq 1.7… on other versions you can use .bind()

    function nextEvent() {
        //behaviour for end
        $(this).on('touchend', function(e){
            /* DO STUFF */
            $(this).off('touchend');
            });
        //behaviour for move
        $(this).on('touchmove', function(e){
            $(this).off('touchend');
            });     
        }
    
    $(element).on('touchstart', this, nextEvent);
    

    Basically, when a ‘touchstart’ happens, I bind actions to ‘touchend’ and ‘touchmove’.

    ‘Touchend’ does whatever I would want a tap to do and then unbinds itself
    ‘Touchmove’ basically does nothing except unbind ‘touchend’

    This way if you tap you get action, if you scroll nothing happens but scrolling..

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

Sidebar

Related Questions

I'm building an application in web.py, but am having some trouble when it comes
I am building a Web Application using asp.net (C#). I come from windows forms
I am building a web application that needs to print directly from browser, however,
I'm having a bit of a problem building a Java Enterprise Edition web application
We're a small team of developers and building a web application. We're currently having
I've been having trouble getting my ASP.NET application to automatically log users into the
I'm building a quiz web application that dynamically generates from a database on my
I am building a web application as college project (using Python), where I need
I am building a web application (in Django, though this isn't a Django-specific question).
I'm building a web application where all database connectivity is done through a proxy

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.