View Single Post
Old 11-28-2012, 09:11 PM   PM User | #3
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
You should be randomising the gallery on the server before delivering the web page. If the page is being generated from PHP then simply shuffle() the array the gallery images are in.

If you have an array of the images in JavaScript that you want in random order then you can shuffle them easily as well if you add a shuffle method - http://javascriptexample.net/extobjects13.php
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote