I am making an app using JQuery mobile.
For swipe events i included one library.By using that i am able to use swipeleft,swiperight,swipeup and swipedown events.
I have tested my app in android 4.0,4.1,4.2 and chrome browser of android 4.4.It works .
CSS
#joy_div { perspective: 500px; } button { margin: 10px 0 0 0; } .left, .right, .down, .up, .reset { transition: transform 0.5s ease; transform-origin: 50% 50%; } .left { transform: rotateY(-40deg); } .right { transform: rotateY(40deg); } .up { transform: rotateX(-40deg); } .down { transform: rotateX(40deg); } .reset { transform: rotateX(0) rotateY(0); }
JQuery
$("#joy_div").swipe ({ swipeStatus:function(event, phase, direction, distance, duration, fingers) { if (phase!="cancel" && phase!="end") {//start,move if( direction == 'left') { $(this).children('#joystick').removeAttr('class') .addClass('left1'); moveClawLeft = 1; } else if (direction == 'right'){ $(this).children('#joystick').removeAttr('class').addClass('right1'); moveClawRight = 1; } else if (direction == 'up'){ $(this).children('#joystick').removeAttr('class') .addClass('up'); moveClawUp = 1; } else if (direction == 'down'){ $(this).children('#joystick').removeAttr('class') .addClass('down'); moveClawDown = 1; } } }, threshold:10, maxTimeThreshold:5000, fingers:'all' });
Problem:
Now after building app ,It works fine in android versions less that 4.4 and in 4.4 these events are called but transform and perspective css properties are not working.
This might be error in cordova wrapping.
Please help me to resolve that error.
Thanks