GalleriaJS / galleria

The JavaScript Image Gallery
https://galleriajs.github.io
MIT License
1.73k stars 345 forks source link

How do i apply autoplay, fade, and transition to my galleria? #98

Closed ispraydesigns closed 13 years ago

ispraydesigns commented 14 years ago
<script type="text/javascript" src="http://www.veryspecialgfx.com/misc/src/jquery.galleria-0.9.js"></script>
<script type="text/javascript">
$(document).ready(function(){ $('ul.gallery_demo2').galleria({nextText:'Next portfolio item'}); }) // activates the gallery

$('#gallery_demo2').galleria({ transition: 'fade', autoplay:true });



here's my header code i believe i'm calling it incorrectly here 

 $('#gallery_demo2').galleria({
        transition: 'fade', autoplay:true
    });

but i'm not positive someone who knows what it's supposed to look like want to help me out?

gallery can be found here - 
 http://www.veryspecialgfx.com/misc/vsgfx%202010/photos.html
pinata commented 14 years ago

Hey mate, for auto play and fade, find and add these lines to your html:

    $('#galleria').galleria({
        data_source: data, // add the flickr data
        show_imagenav: false, // remove the prev/next arrows
    transition: 'fade', //ADD THIS LINE HERE FOR FADING

       extend: function() { // ADD THIS AND FOLLOWING LINE FOR AUTOPLAY
       this.play(4000); // will advance every 4th second
       var gallery = this; // save the scope

// And in the galleria.classic.css (or whichever theme you're using), use

    transition: 'fade',

instead of transition: 'slide',

This worked for me.

My entire galleria code in the html looks like this, so you have all parenthesis etc. correct too (hope it doesn't get cut)

Githubissues.
  • Githubissues is a development platform for aggregating issues.