Jump to content

[SOLVED] Loading two random images that match


alex3

Recommended Posts

I'm building a site that loads two images when loaded, a header and a footer image. These two images are two separate image files and the website has length that is dependent on the amount of content, which may change.

 

What I'm after is that, each time the page is loaded, these header and footer images change in some random fashion, I've found this script which seems to do that. However, I need the header and footer image to match and I can't figure out how. I have my images arranged as headerpX.png and footerpX.png where X is a number from 1 to however many images are in the image folder that the script uses. I'm trying to get a script that will load a random headerpX.png image and then load the matching footer image.

 

So basically, a script that loads a random header image from the specified folder, and then loads the footer image with the matching number. Is this possible? If so, how easy would it be to implement?

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.