1

I want to make a div draggable, so that I can drag an gmap (like an widget). I don't want to drag the content of the gmap.

In my JSfiddle it works on computer browser but don't on a mobile browser. That's my simple code:

function initialize() {
    var mapOptions = {
        center: new google.maps.LatLng(-34.397, 150.644),

        zoom: 8
    };
    var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
     map.setOptions({"draggable" : false });
    $(function() {
        $( ".drag" ).draggable();
    });
}

What can I do?

I'm using jQuery UI Touch Punch for react on touch events.

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52

1 Answers1

0

Jquery UI doesn't currently support touch events. You can however use libraries to accomplish the behavior you're looking for. Jquery UI Touch Punch is a good example.

Jeremy W
  • 1,889
  • 6
  • 29
  • 37