Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

can you please tell me how to get long press event in phone gap ?.
I want to get position of x and y coordinate on long press .? in phonegap ?

Thanks
Posted

1 solution

JavaScript
$("#myDiv").bind("touchstart", function (e)
    {
        var org = e.originalEvent.touches[0]; 
        var x = orig.changedTouches[0].pageX;//relative position of html,body document
        var y = orig.changedTouches[0].pageY;//relative position of html,body document
    });
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900