Phone/Tablet Gestures

Jan 7, 2013 at 11:01 AM

I'm currently using the Ad Gallery on my website and it's working very well but I really want to be able to add a little more functionality.

Is there any way that the it can be made to go to previous or next images using touch gestures? I've had a look around the forums and I still can't find anyting telling me how to do this. If I was to use one of the libraries available, where exactly would I put it?

Any help would be greatly appreciated.

Feb 7, 2013 at 9:45 AM
I also am trying to do this. have you managed to get anything close to gestures on a phone /pad?
Feb 7, 2013 at 4:08 PM
Unfortunately not.
I can get swipes working, just not as part of the Ad-Gallery (which I realise isn't much help here).
I've tried inserting code snippets into the javascript but I'm not that great at it and it just ends up not working.
Feb 8, 2013 at 6:18 AM
yeah it's a pitty, other plugins either have gestures or imperfect scalling , haven't found one with both. Ad gallery has great scaling and transitions. though. anyway thanks RobGphoto.
Oct 15, 2013 at 7:40 PM
Edited Oct 15, 2013 at 7:40 PM
I have managed to integrate swipe code from http://wowmotty.blogspot.de/2011/10/adding-swipe-support.html to support swiping like this:
  • use
target = $('.ad-image-wrapper');
for the code example from above link
  • use
$('.ad-next').trigger( "click" );
as swipe left and
$('.ad-prev').trigger( "click" );
as swipe right actions for the code example from above link
  • disable prev/next buttons on devices that support swipe with
            var touch = "ontouchend" in document;
            if (touch) {
                $('.ad-next').hide();
                $('.ad-prev').hide();
            }
    
in the afterImageVisible callback from ad-gallery