0

I was wondering if it's possible to randomise the list of images galleria uses to be different each time on document.load

Any ideas?

Tara Irvine
  • 819
  • 3
  • 22
  • 42

3 Answers3

2

The easiest way to handle this would be to do it on the server with the scripting language of your choice. If you want to do something like this on the client side, you could look at this plugin here, which allows you to randomize an array of jQuery objects.

Should be as easy as:

$('.images').shuffle().galleria();
polarblau
  • 17,649
  • 7
  • 63
  • 84
  • Thanks so much I had that plugin yesterday and couldn't get it to work, was clearly missing the important code you added, GREAT!! :D – Tara Irvine Jan 19 '11 at 14:34
0

Just use galleria's option

dataSort: 'random' 

would do the job without accommodating other solution

minimoo
  • 11
  • 2
0

Put the images in an array, sort the array randomly.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176