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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:58:42+00:00 2026-06-15T20:58:42+00:00

I’m doing the program and wanted to add swiping screen with your finger, I

  • 0

I’m doing the program and wanted to add swiping screen with your finger, I did it but for some reason it does not work on my phone with Android 2.3.3, but in the browser, all works fine. Can you tell what’s the problem?

here is the code

    <!DOCTYPE html>
<html>
<head>

  <title>jQuery Mobile test page</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet"  href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
  <!-- <link rel="stylesheet"  href="jquery.mobile/jquery.mobile-1.1.0.css" />  -->
  <script src="http://code.jquery.com/jquery-1.7.1.js"></script> 
  <script type="text/javascript">
    var pageSeq = ['page1','page2','page3','page4'];
    var currentPage = 0;
    var bindSwipeEvents = function() {
        $(".ui-page").swipeleft(function() {
            console.log(pageSeq.length + ",current:"+currentPage);
            if(currentPage==pageSeq.length) { return; }
            currentPage++;
            $.mobile.changePage( $('#'+pageSeq[currentPage]), 
                             { transition: "slide", reverse:false});
        });

        $(".ui-page").swiperight(function() {
            if(currentPage==0) { return; }
            currentPage--;
            $.mobile.changePage( $('#'+pageSeq[currentPage]), 
                             { transition: "slide", reverse:true});
        });
    };

    $( '.ui-page' ).live( 'pageinit',function(event){
        bindSwipeEvents();
    });
    bindSwipeEvents();
  </script>
  <script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
  <!-- <script src="jquery.mobile/jquery.mobile-1.1.0.js"></script>  -->
  <script type="text/javascript" charset="utf-8" src="js/cordova-1.6.1.js"></script> 
</head>

<body>

<div data-role="page" id="page1">
    <div data-role="header">
        <h1>Page Title</h1>
    </div><!-- /header -->

    <div data-role="content">    
        <h3> Page 1 </h3>            
    </div><!-- /content -->

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->

<div data-role="page" id="page2">
    <div data-role="header">
        <a data-rel="back">Back</a>
        <h1>Page Title</h1>
    </div><!-- /header -->

    <div data-role="content">    
        <h3>Page 2</h3>
    </div><!-- /content -->

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
<div data-role="page" id="page3">
    <div data-role="header">
        <a data-rel="back">Back</a>
        <h1>Page Title</h1>
    </div><!-- /header -->

    <div data-role="content">    
        <h3>Page 3</h3>
    </div><!-- /content -->

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
<div data-role="page" id="page4">
    <div data-role="header">
        <a data-rel="back">Back</a>
        <h1>Page Title</h1>
    </div><!-- /header -->

    <div data-role="content">    
        <h3>Page 4</h3>
    </div><!-- /content -->

    <div data-role="footer">
        <h4>Page Footer</h4>
    </div><!-- /footer -->
</div><!-- /page -->
</body>
</html>
  • 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-15T20:58:43+00:00Added an answer on June 15, 2026 at 8:58 pm

    Multi-touch events such as swipe and pinch don’t work in the android browser in the majority of android 2.x ROMs (see here).

    However, you can re-enable these events and therefore use them in phonegap apps on android 2.x devices using this workaround.

    I’ve used this in my phonegap app and successfully tested it on android 2.2 using the hammer.js library to do the event listening.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I am doing a simple coin flipping experiment for class that involves flipping a
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
This could be a duplicate question, but I have no idea what search terms

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.