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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:41:03+00:00 2026-05-28T07:41:03+00:00

I use jQuery, jQuery UI and jQuery mobile to build a web application for

  • 0

I use jQuery, jQuery UI and jQuery mobile to build a web application for iPhone / iPad.
Now I create images and they should be draggable, so I did this:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>Drag - Test</title>
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
        <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script>
    </head> 
    <body>
    <div>
        <div style="width:500px;height:500px;border:1px solid red;">
            <img src="http://upload.wikimedia.org/wikipedia/en/thumb/9/9e/JQuery_logo.svg/200px-JQuery_logo.svg.png" class="draggable" alt="jQuery logo" />
            <img src="http://upload.wikimedia.org/wikipedia/en/a/ab/Apple-logo.png" class="draggable" alt="Apple Inc. logo" />
        </div>
    </div>
</body>

<script type="text/javascript">
    $(document).ready(function() {
        $(".draggable").draggable();
    });
</script>
</html>

Here you can see the live example: http://jsbin.com/igena4/

The problem is, that the whole page want to scroll. I searched in Apple’s HTML5 examples and found this to prevent the scrolling of the page, so that the image is draggable:

...
onDragStart: function(event) {
    // stop page from panning on iPhone/iPad - we're moving a note, not the page
    event.preventDefault();
    ...
}

But the problem is for me, how can I include this into my jQuery? Where do I get event?

Best Regards.

  • 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-05-28T07:41:04+00:00Added an answer on May 28, 2026 at 7:41 am

    Try this library

    https://github.com/furf/jquery-ui-touch-punch

    Just follow these simple steps to enable touch events in your jQuery
    UI app:

    1. Include jQuery and jQuery UI on your page.

      <script src="http://code.jquery.com/jquery.min.js"></script>
      <script src="http://code.jquery.com/ui/1.8.17/jquery-ui.min.js"></script>
      
    2. Include Touch Punch after jQuery UI and before its first use.

      Please note that if you are using jQuery UI’s components, Touch Punch must be included after jquery.ui.mouse.js, as Touch Punch
      modifies its behavior.

      <script src="jquery.ui.touch-punch.min.js"></script>
      
    3. There is no 3. Just use jQuery UI as expected and watch it work at the touch of a finger.

      <script>$('#widget').draggable();</script>
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use Jquery Mobile for a web-app, and depending on what button
I'm working on a web app, which I decided to use jQuery Mobile for
I have been assigned to build a mobile web application. I have found two
So I'm working on a web app that makes use of the jquery mobile
Mobile browsers. Jquery dialog alert box. I don't want to use alert() because it
We have an existing web app built with jQuery Mobile. Our goal is to
I've worked with JqueryMobile to build HTML5 mobile apps. I use a cache manifest
I am currently designing a native android application. I am planning to use jQuery
I wrote a phonegap / jQuery mobile app which runs fun in the iphone
I am converting an existing ASP.NET website to use jQuery Mobile controls. The first

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.