I've got a client who wants their header to contain random changing images and random changing text. I have a script written that is changing images and it works great. I've also found scripts that randomize images and text.

Here's the catch though, I need the text and images NOT linked. So that text_a could end up showing at the same time as image_1 or image_6.

The other catch is that the text needs to overlap the image. Not be above or below.

I have no idea how to do this. I'm not even positive I can do this with JS. If anybody has any idea of a script I could use or an app or anything to accomplish this that would be awesome.

Thanks!

Recommended Answers

All 2 Replies

Oh yeah, and the changes need to be timed and not based on page open.

As for the randomness, you can store the text in a Javascript array. The same goes with images. Then generate two random numbers. If they are not equal display the combination, and if equal, then generate another set within the specified bounds.

The positioning is more of CSS + XHTML than Javascript.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.