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

  • SEARCH
  • Home
  • 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 8357657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:33:00+00:00 2026-06-09T10:33:00+00:00

I am looking to utilize swipe events on a mobile web app (Android, and

  • 0

I am looking to utilize swipe events on a mobile web app (Android, and iOS), but I also need the browsers native pinch to zoom functionality to stay in place.

I have tried using various touch event libraries such as Hammer.js, but all seem to discard mobile Safari’s pinch to zoom functionality when swipes are handled. It would also be nice to keep vertical scrolling intact as well.

Basically, I am looking for a way to recognize left/right direction swipes, and only that. Any ideas?

  • 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-09T10:33:02+00:00Added an answer on June 9, 2026 at 10:33 am

    I used similar functionality to this in a recent project. To allow the pinch to zoom functionality to work you just need to make sure you correctly specify the values in the viewport tag eg.

    <meta name=viewport content="width=device-width,user-scalable=yes,initial-scale=1.0, maximum-scale=2.0"/>
    

    The most important values are the user-scalable=yes and also the maximum scale since this must be greater than 1.0 to allow for zooming.

    You can find more information on viewport here: https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag

    For the swipe events you can bind the swipeleft and swiperight events to a .on() function in jQuery Mobile.

    Here is an example of what your code should look like:

    $('#yourElement').on('swipeleft swiperight', function (event) {
        //swiped to the left
        if (event.type == "swipeleft") {
            //do something
        }
        //swiped to the right
        if (event.type == "swiperight") {
           //do something
        }
    });
    

    For more info on jQuery Mobile events you can check out this link (or the link m_gol provided above since they are basically the same):

    http://jquerymobile.com/demos/1.1.1/docs/api/events.html

    Using both sets of code above, you will be able to detect swipe events as well as pinch to zoom the page.

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

Sidebar

Related Questions

I'm looking into using PhoneGap for an iOS app so that I can utilize
I'm looking to implement some templates in a web application and wanted to utilize
I have application using Android 2.1 which utilize LocationManager to get the altitude. But
I am looking to utilize Solr for both text and geospatial searching in a
I'm attempting to utilize the socket.h functions within Windows. Essentially, I'm currently looking at
I was looking to build a Data Access Layer for my new web based
We're looking to develop a mobile website. On this mobile website, we'd like to
We are looking to utilize extensionless URL's for the first time in our organization.
I'm looking into writing a small custom app for a small business that can
I'm looking to utilize jQuery's UI plugin to create draggable() and droppable() behavior similar

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.