Random billede
Jeg har brug for at nedenstående script vælger et billede random hvergang der fades, istedet for som nu, hvor den kører i rækkefølge.java script:
<script type="text/javascript">
<!--
$(document).ready(function(){
// jQuery Cycle Plugin - Homepage Display
$('#display').cycle({
fx: 'fade',
speed: 1500,
timeout: 4500
});
// PrettyPhoto Image Viewer
$("a[rel^='prettyPhoto']").prettyPhoto({
animationSpeed: 'normal', /* fast/slow/normal */
padding: 40, /* padding for each side of the picture */
opacity: 0.8, /* Value betwee 0 and 1 */
showTitle: false, /* true/false */
allowresize: true, /* true/false */
theme: 'light_square', /* light_rounded / dark_rounded / light_square / dark_square */
callback: function(){}
});
})
-->
</script>
Images:
<div id="display">
<a href="#"><img src="img/foraar2012/forside/1.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/2.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/3.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/4.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/5a.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/6.jpg" width="566" height="197" alt="" /></a>
<a href="#"><img src="img/foraar2012/forside/7.jpg" width="566" height="197" alt="" /></a>
</div>