0 Replies Latest reply on Jan 2, 2015 9:39 AM by JRHall

    draggable interaction not working on android

    JRHall Level 1

      I'm using Jquery UI draggable in a project of mine, a cross-platform app.

       

      The draggable part works on iOS and Android - the element can be dragged, though it seems to be more offset the farther I drag it.

       

      However, the draggable element's position should trigger a hide/show action on another object along with an audio event. This works fine on iOS but not on Android.

       

      My code is as follows:

       

      //Make element draggable

      sym.$("MOWER").draggable({ containment: "parent", axis: "x" });

       

      //Draggable element affects other element and plays sound

      sym.$("MOWER").touchmove(function(e) {

        m=1;

            if($(e.target).position().left>284){

                sym.$("MOOSHI_BACK").show();

                sym.$("MOOSHI_FWD").hide();

                playPGAudio(getPGPath() + "media/SFX_MooshiBark.mp3");

       

       

            }else{

                sym.$("MOOSHI_BACK").hide();

                sym.$("MOOSHI_FWD").show();

            }

        });

       

      Both parts of the code are in compositionReady. This is necessary because of the audio, if I attach the play audio script to the element itself it won't play.

       

      However, I have tried the script on the element as well but I get the same result, it drags but doesn't trigger the hide/show

       

       

      Thanks in advance for your help...

       

      Justin