Page 1 of 2

Touch Events:SwipeLeft and Swiperight events?

Posted: Thu Dec 01, 2011 9:53 am
by rdulepet

I am building a Twitter Search API app using Tiggr. I would like to show 15 results per page and then navigate to next page by sending request again to Twitter. Assuming I generate native code for iPhone or Android, how do I handle SwipeLeft or SwipeRight motion. I don't see those events, can you please guide me as to how I can bind these events?

Essentially I am looking to support Touch Events akin to:
http://jquerymobile.com/demos/1.0a4.1...


Touch Events:SwipeLeft and Swiperight events?

Posted: Thu Dec 01, 2011 11:34 am
by maxkatz

We are working on adding swipe events but they are currently not supported out-of -the-box. But, you should be able to add them with custom JavaScript.


Touch Events:SwipeLeft and Swiperight events?

Posted: Thu Dec 01, 2011 5:16 pm
by rdulepet

Thats fine if custom javascript works too. Hmmm... wonder what I am doing wrong. In the mobile app screen page_load event I add following code, and I tried this both a GRID level (have a grid in the page) and at the page level but doesnt seem to detect.

$('[dsid="mobilescreen1"]').bind('swipeleft',function(event, ui){
alert('This page was swiped left');
});

$('[dsid="mobilescreen1"]').bind('swiperight',function(event, ui){
alert('This page was swiped right');
});


Touch Events:SwipeLeft and Swiperight events?

Posted: Fri Dec 02, 2011 10:07 pm
by maxkatz

Thanks.. looking at this.


Touch Events:SwipeLeft and Swiperight events?

Posted: Mon Dec 19, 2011 8:49 pm
by Christian Weyer

Has this been solved, BTW?


Touch Events:SwipeLeft and Swiperight events?

Posted: Mon Dec 19, 2011 9:23 pm
by maxkatz

Oops.. sorry that we left it unanswered. Checking right now.


Touch Events:SwipeLeft and Swiperight events?

Posted: Mon Dec 19, 2011 9:48 pm
by maxkatz

The code above is correct, the only different is that the event has to be attached to mobilecontainer1:

code
$('[dsid="mobilecontainer1"]').bind('swipeleft',function(event, ui){
alert('This page was swiped left');
});

$('[dsid="mobilecontainer1"]').bind('swiperight',function(event, ui){
alert('This page was swiped right');
});
/code


Touch Events:SwipeLeft and Swiperight events?

Posted: Tue Jan 10, 2012 1:58 am
by Feeniix_

I've created a new project (swipe input) and am selecting the mobilecontainer on the page, I click on events, but when I select load (or anything, for that matter) it's not automatically changing the GUI so I can select the type of event, etc. I've shared the app with a href="mailto:support@gotiggr.com" rel="nofollow"support@gotiggr.com/a if you'd like to investigate this?

Regards,
Jiamee


Touch Events:SwipeLeft and Swiperight events?

Posted: Tue Jan 10, 2012 2:00 am
by Feeniix_

PS. I've tried firefox 9.0.1 and internet explorer 7.

Regards,
Jaimee


Touch Events:SwipeLeft and Swiperight events?

Posted: Tue Jan 10, 2012 3:19 am
by Feeniix_

Or am I supposed to actually place the code on the screen load? :-/