Search code examples
javascriptiphoneipaddraggable

How to make things dragable with JS on iPad, iPhone?


you know, i'm searching for a way to move items via mouse-dragging (as we know from several slider plugins) handled by JS which will work on iPhone and iPad Browser too?

hope anybody can help me. thanks a lot!


Solution

  • I never tried it myself but you should be able to use special safari events for iphone and probably also ipad like touchstart, touchmove and touchend.

    description from Apple: https://developer.apple.com/library/content/documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/InteractiveControl/InteractiveControl.html#//apple_ref/doc/uid/TP40008032-CH3-SW3