Utarehpson
Utarehpson

Reputation: 166

windows phone: jquery mobile swipe not recognized

I'm making an HTML + jquery mobile app. It works fine on my pc but when I try it out on my windows phone the swipe event doesn't seem to get fired..

$('div.ui-page').live("swipeleft", function () {
 goToNextPage()
});

Upvotes: 1

Views: 2464

Answers (2)

Eric Hackman
Eric Hackman

Reputation: 11

Tested the jquery mobile swipe example on a Lumia 920, and it worked perfectly. So trust it works well for WP8 devices. http://jquerymobile.com/demos/1.3.0/docs/examples/swipe/swipe-page.html. I actually used a slide menu plugin with swipe function and it worked on the Lumia 920. Here is the link to the plugin : https://github.com/tegansnyder/JQuery-Mobile-Slide-Menu

Upvotes: 1

Sergei Grebnov
Sergei Grebnov

Reputation: 2623

Windows Phone 7/IE9 does not support mousemove event so there is not way for jquery mobile to recognize swipe event.

Some mobile frameworks like Apache Cordova (PhoneGap) provide workaround for this by adding special shim between native (silverlight) touch events and web browser control to fix missing mouse events. Demo

Update

This works fine on Windows Phone 8 since it supports mousemove.

Upvotes: 2

Related Questions