Jump to content

Random images in set of two


dc_jt

Recommended Posts

Hi

 

Ive got a set of 7 images, 6 sets contains two images and 1 set contains three images.

 

I want to display the images randomly but in sets, therefore if you click refresh the first set could be set three followed by set seven followed by set one etc.

 

All images are static and are just displayed like below:

 

<div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/vinyl1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/vinyl2.jpg" class="full" /> 
            </div>    
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/retail1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/retail2.jpg" class="full" /> 
            </div>   
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/devhoard1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/devhoard2.jpg" class="full" /> 
            </div> 
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/exhibition1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/exhibition2.jpg" class="full" /> 
            </div>    
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/backdrop1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/backdrop2.jpg" class="full" /> 
            </div> 
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/vehicle1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/vehicle2.jpg" class="full" /> 
            </div>
            
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/welcomeworld1.jpg" class="full" /> 
            </div>    
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/welcomeworld2.jpg" class="full" /> 
            </div>
            
            <div class="imageElement">
            <h4>Item 1 Title</h4>
            <p>Item 1 Description</p>
            <img src="assets/images/slideshow/welcomeworld3.jpg" class="full" /> 
            </div>  

 

How would I randomise this?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/89370-random-images-in-set-of-two/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.