1

i am starting to work with the jquery touch punch extensions in order to allow draggability on ipad, but i am getting tripped up right away. probably something terribly dumb on my part. the draggable example from the developer works fine on my ipad:

http://furf.com/exp/touch-punch/draggable.html

this works fine in my desktop browser, but on the ipad it just focuses on the block and scrolls the entire page as i drag, as if it were just an image or other normal embedded object. as this is what happens normally with jquery/ui on ipad, this makes me think it is not loading or otherwise ignoring the "punch" code from my site (though if i host the jquery files on my site via the same path, those load and function fine in desktop browser). here's the entire code, very basic:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Touchpunchtest</title>
<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>
<script src="js/jquery.ui.touch-punch.js"></script>
</head>
<body>
<div id="draggybox" onclick="void(0)" style="width: 150px; height: 150px; background: green;"></div>
<script>$('#draggybox').draggable();</script>
</body>
</html>

what am i missing?!

Paul D. Waite
  • 96,640
  • 56
  • 199
  • 270
dshuta
  • 11
  • 1
  • 6

1 Answers1

0

If the project is downloaded from GIT hub, it seems to be fine. Not sure where you got your jquery.ui.touch-punch.js file from, but it seems to error. Your browser probably compensates for it, but the iPad browser does not.

AJak
  • 3,863
  • 1
  • 19
  • 28
  • i downloaded it from github today! :( – dshuta Mar 23 '12 at 00:17
  • 1
    oof, i downloaded it incorrectly, grabbed some files other than the zip. it is working now. phew! thought i was going crazy, when in fact i was just terribly dumb (my original surmise). – dshuta Mar 23 '12 at 00:22
  • 1
    AJak was correct. The plugin only works when touch is available so your desktop will ignore the code. If you need any help using Touch Punch, you can contact me (the developer) by visiting the plugin page http://touchpunch.furf.com – furf Apr 20 '12 at 13:49