Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9188545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:02:06+00:00 2026-06-17T20:02:06+00:00

I am using prettyPhoto for displaying images I get from Flickr. It is working

  • 0

I am using prettyPhoto for displaying images I get from Flickr. It is working great on the Desktop and on the iPad.
For the iPad I wanted to add swiping gestures for switching images. So I was trying to add TouchSwipe.

Here is how I setup my prettyPhoto. Notice the callback.

function setupBox() {
    $("a[rel^='prettyPhoto[gallery1]']").prettyPhoto({
        slideshow: 5000,
        social_tools: '',
        animation_speed:'normal',
        theme:'facebook',
        changepicturecallback: function() {
            setupSwipe();
        }
    });
}

Here is the callback function. ‘#fullResImg’ is the selector for the Image.

function setupSwipe() {
    $('#fullResImg').swipe({
        swipe:function(event, direction, distance, duration, fingerCount) {
            if( direction == 'left' ) {
                $.prettyPhoto.changePage('next');
            }else if ( direction == 'right' ) {
                $.prettyPhoto.changePage('previous');
            }
        },
        allowPageScroll: "none",
    });
}

All the functions are called correctly, but the swipe is not detected.
If I change the selector to ‘.pp_content’ I can swipe in the bottom of the Box, but also not on the image itself.

I suspect, that it has something to do with the stacking of the box, but I stried several other selectors, which didn’t work on the actual Image.

I’ll include the markup of the pP Box here:

<div class="pp_pic_holder facebook" style="top: 90.5px; left: 80px; display: block; width: 816px;">
   <div class="ppt" style="opacity: 1; display: block; width: 776px;">LN-RKI</div>
   <div class="pp_top">
    <div class="pp_left"></div>
    <div class="pp_middle"></div>
    <div class="pp_right"></div>
   </div>
   <div class="pp_content_container">
    <div class="pp_left">
    <div class="pp_right">
     <div class="pp_content" style="height: 552px; width: 776px;">
      <div class="pp_loaderIcon" style="display: none;"></div>
      <div class="pp_fade" style="display: block;">
       <a href="#" class="pp_expand" title="Expand the image" style="display: inline;">Expand</a>
       <div class="pp_hoverContainer" style="height: 516px; width: 776px;">
        <a class="pp_next" href="#">next</a>
        <a class="pp_previous" href="#">previous</a>
       </div>
       <div id="pp_full_res"><img id="fullResImage" src="http://farm9.static.flickr.com/8489/8265747809_d0fca2a7c9_b.jpg" style="height: 516px; width: 776px;"></div>
       <div class="pp_details" style="width: 776px;">
        <div class="pp_nav" style=""><a href="#" class="pp_play">Play</a>
         <a href="#" class="pp_arrow_previous">Previous</a>
         <p class="currentTextHolder">1/50</p>
         <a href="#" class="pp_arrow_next">Next</a>
        </div>
        <p class="pp_description" style="display: none;"></p>
        <div class="pp_social"></div>
        <a class="pp_close" href="#">Close</a>
       </div>
      </div>
     </div>
    </div>
    </div>
   </div>
   <div class="pp_bottom">
    <div class="pp_left"></div>
    <div class="pp_middle"></div>
    <div class="pp_right"></div>
   </div>
  </div>
 <div class="pp_overlay" style="opacity: 0.8; height: 954px; width: 959px; display: block;"></div>

So, has anyone here a clue on how to use TouchSwipe for swiping through images on prettyPhoto?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:02:08+00:00Added an answer on June 17, 2026 at 8:02 pm

    I used the answer above to implement the same feature but with TouchWipe and found that instead of removing ‘.pp_hoverContainer’ you can just add the swipe action to that element like so:

        $(document).ready(function(){
            function setupBox() {
               $("a[rel^='prettyPhoto']").prettyPhoto({
                    social_tools: false,
                    theme:'dark_rounded',
                    changepicturecallback: function() {
                        setupSwipe();
                    }
               });
            }
            function setupSwipe() {
               $(".pp_hoverContainer").touchwipe({
                wipeLeft: function() { 
                    $.prettyPhoto.changePage('next');
                },  
                wipeRight: function() { 
                   $.prettyPhoto.changePage('previous');
            },
               min_move_x: 20,
               min_move_y: 20,
               preventDefaultEvents: true
           });
       }
       setupBox();
       });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dynamically loading images from flickr using the api. However, when I try to
I'm using phpflickr to retrieve images from Flickr. For some reason photosets_getPhotos doesn't contain
I am using PrettyPhoto Jquery plugin as a Lightbox for displaying images on my
I'm using the JQuery prettyPhoto lightbox clone, and it works great, but I have
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I was trying to add popup helpers on my page using prettyPhoto ( link
I'm using jquery.prettyPhoto for displaying photo-albums on my site. I activated the social_tools to
I am using jquery prettyphoto 2.5.3 and I was wondering how I can get
I am using PrettyPhoto 3.1.4 from http://www.no-margin-for-errors.com I am using a content handler in
I am using prettyPhoto to create a slideshow of images on website & is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.