Agrajag
Agrajag

Reputation: 1034

Jquery galleria - make the first image in the gallery appear automatically

I've added the excellent galleria-plugin to a website I'm working on. However unlike the demo, I've been unable to make the first image display automatically on page-load.

Currently, you have to click an image, before one will appear, after that everything works as expected. And yes, I've tried setting the class of the first image to "active", but without that having any effect.

Is there anything obvious I'm missing ?

There's a live example at: http://kaciekimber.co.za/property/r8453d

Upvotes: 1

Views: 1843

Answers (3)

Essex Landscaper
Essex Landscaper

Reputation: 1

Yeh its a cool gallery I am using it as well :

http://www.achlandscapes.co.uk/decking.htm

Upvotes: 0

Simeon
Simeon

Reputation: 5579

I think I've found the problem. Add <li class="active"> instead of <img class="active" ... /> and your first image will load automatically.

Upvotes: 2

Simeon
Simeon

Reputation: 5579

Try this:

$(function(){
    $('.galleria img:first').click();
});

Upvotes: 1

Related Questions