views:

362

answers:

1

I have the following javascript:

    var jQT = new $.jQTouch({
            touchSelector: '#swipeme',
            fixedViewport: false,
            fullScreen: false
            });

            $('#swipeme').bind('swipe', function(evt, data) {
                $('#gallery').css('margin-left',parseInt($('#gallery').css('margin-left'))-100 );
            });

Now this is very basic, it changes the margin of the gallery when I swipe it.

Ideally Id like to end up withe gallery sliding left and right (by changing margins) depending on the direction and speed swiped.

However I am having trouble trying to figure these out as I don't know where these variables are.

Ive tried console.log on evt and data but on the iPhone it doesn't give you much details and cannot find any decent documentation for jQTouch anywhere.

Any advice appreciated, Thanks.

+1  A: 

docs says you might want to have a look at data.direction ("left" or "right ")in your listener fn. not a lot about swipe speed though. Ask here: http://blog.jqtouch.com/submit

tjp
The other place to look for info is jqtouches google group (which is quite active) http://groups.google.com/group/jqtouch
Kris Erickson