jQuery random image

jQuery random image

Hi everyone,

I'm using the jQuery Tools showreel plugin http://flowplayer.org/tools/tabs/slideshow.html

Basically I am just showing 6 images. But the thing is the client wants a random image to appear at the start. So the same image isn't the same every-time someone goes onto the website.

Can anyone help: Here is my code:

  1. jQuery(document).ready(function($) { $(".slidetabs").tabs(".images > div", { // enable "cross-fading" effect effect: 'fade', fadeOutSpeed: "slow", // start from the beginning after the last tab rotate: true // use the slideshow plugin. It accepts its own configuration }).slideshow(); }); 
And My HTML is:

  1. <div id="showreel"><!--Open Showreel--> <a class="backward">prev</a> <div class="images"> <div><a href="#"><img src="yorkshire.jpg" alt="Bag it Up" /></a></div> <div><a href="#"><img src="dorset.jpg" alt="Bag it Up" /></a></div> <div><a href="#"><img src="essex.jpg" alt="Bag it Up" /></a></div> 
     <div><a href="#"><img src="francis.jpg" alt="Bag it Up" /></a></div> <div><a href="#"><img src="hampshire.jpg" alt="Bag it Up" /></a></div> <div><a href="#"><img src="wigan.jpg" alt="Bag it Up" /></a></div> </div> <a class="forward">next</a> <div class="slidetabs"> <a href="#"></a> <a href="#"></a> <a href="#"></a>
                      </div> </div><!--Close Showreel-->