O'Reilly logo

Instant Galleria How-to by Nathan Van Gheem

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Galleria (Simple)

In this recipe, we'll learn how to get more out of Galleria by knowing how to turn the knobs that will customize the gallery in different ways.

Getting ready

In this example, please utilize the code we wrote in the first How to do it... section, or work with the themes/classic/classic-demo.html file. Both will allow us to manipulate configuration options.

How to do it...

To configure Galleria, we'll use the Galleria.configure method. This method accepts a JavaScript object of keys and values.

Galleria.configure({
    autoplay: true
});

In this example, we're invoking Galleria to automatically start the gallery when the page is loaded with the autoplay option.

How it works...

The JavaScript object passed into the Galleria.configure ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required