Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

slide show shows ramdom photos

Featured Replies

My client whats a slide show which can choose random photos at any time. But the first one is always first.

where are you getting the images from? If it's from a database then pull them into an array and sort that randomly.....except for the first image.

Display the first image then read the array to display the others.

 

Similarly you could probably scan a directory into an array and sort that.

 

All in lovely PHP.

Yeah it depends on where the images are coming from - are they stored in a directory? in a database? or do you mean you have a set of images that you want to play in a random order?

  • Author

Its coming from like this with some jqueary:

 

<script type="text/javascript">
$(document).ready(function(){

$('#placeholder').crossSlide({
 sleep: 2,
 fade: 1

}, [
 { src: 'images/slide0.jpg' },
 { src: 'images/slide1.jpg' },
 { src: 'images/slide2.jpg' },
 { src: 'images/slide3.jpg' },
 { src: 'images/slide4.jpg' },
 { src: 'images/slide5.jpg' },
 { src: 'images/slide6.jpg'},
 { src: 'images/slide7.jpg' },
 { src: 'images/slide8.jpg' },
 { src: 'images/slide9.jpg' },
 { src: 'images/slide10.jpg' },
 { src: 'images/slide11.jpg' },
 { src: 'images/slide12.jpg' },
 { src: 'images/slide13.jpg'}


]);

});

</script>

 

Yeah well i need to learn PHP so if you have a turorial I create one.

Database never created one in database

Edited by Vulcan

change transitions/mode to Fade and viola - it fades in and out instead of sliding :)

 

Read the API & Options :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.