Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Add swipe animation to Galleria.js slideshow WordPress

Hello,

I am using the Galleria.js to display a gallery on a WordPress portfolio site. A sample gallery can be seen by clicking a thumbnail here — http://totophoto.mattwooddc.com/portfolio/studio/

The code is currently working with swipe gestures, but the animation is a "fade" that is incorporated into the "basic lightbox" script <em>inside</em> galleria.js

I am using a part of the basic Galleria.js code, without a theme, as its only the lightbox functionality that is being used. I know that the code includes swipe transitions, but how can I incorporate the native swipe transitions from Galleria (seen here — http://galleria.aino.se/themes/classic/ ) into the lightbox I have loaded here — http://totophoto.mattwooddc.com/portfolio/studio/

Answers (3)

2011-11-13

Christianto answers:

Hi, You want the "swipe" transition on http://galleria.aino.se/themes/classic to be incorporated inside lightbox fancybox instead of fade effect?

The way lightbox script like fancybox, prettyPhoto .etc work is by creating <div> wrapper as an element for the lightbox and loading bigger version of images and put it to the wrapper, it works one by one per image click.

While if we want "swipe", a series of bigger version of images should be loaded and put in the wrapper or we have to load another image before user click next/prev so we can slide the image when user advance to next/prev.

Its not easy to hack the way fancybox works because its very basic.

Beside when item is "swipe" at the same time it should expand since the image size isn't same. At least if we want to swipe, it should have the same height.

I suggest you can try to use other script for this function instead of modify the plugin.
Please check [[LINK href="http://flowplayer.org/tools/demos/combine/portfolio/preload.html"]]jQuery tools plugin page here for example[[/LINK]]. The plugin use more flexible way to showing image in "lightbox" style. The example page it combine the overlay (lightbox version of the plugin) and scrollable (for swipe effect). But still, it should have the same images height to works.

Hope this help..



2011-11-13

Kannan C answers:

As Christianto says, lightbox isn't made in a way to support as image sliders. Instead of loading the images with lightbox, make a call to the images in a separate page using custom query and add a different slider which supports swipe transition. Finally add the link to that separate page to all the gallery images.

2011-11-14

Luis Abarca answers:

Has you tried the transition option ?


$('#galleria').galleria({
transition: 'slide',
....
});