PDA

View Full Version : Random Imgs with Text



dennismonsewicz
07-02-2008, 03:51 PM
I have done some minor javascript but nothing really major. I have used jQuery for a lot of stuff I have done (I know, I know its cheating, please don't hate me for it), but I need help with writing a function that will display a group of images at random with text that corresponds to the image and the images cannot repeat. LOL any help at all is grealy appreciated! Thanks!

dennismonsewicz
07-02-2008, 05:59 PM
bump!

jscheuer1
07-02-2008, 06:49 PM
jQuery isn't cheating, in fact it's one of the best of its kind. Here's a script that does what you are asking, it can also do more, it is highly configurable:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

dennismonsewicz
07-02-2008, 07:31 PM
jQuery isn't cheating, in fact it's one of the best of its kind. Here's a script that does what you are asking, it can also do more, it is highly configurable:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

Thanks :) how would i modify this to show like 6 images at a time? instead of just one at a time

jscheuer1
07-03-2008, 12:37 AM
The script I linked you to can show as many images at once as you like (the demo page itself shows three images at a time). This is because it is object oriented and can therefore be used as many times (within reason - browser and CPU limitations apply) on a single page as you need.

Each show can be configured for random execution. If that's not enough randomness for you, we could work out a small subroutine to shuffle the shows and/or to 'cross pollinate' their contents before execution. However, 6 shows each with a unique image array, all set to execute their array at random would fulfill in word what you are asking for, and is configurable without modification.

Be sure to go over the documentation for the script thoroughly, it has many options and capabilities.

If you need help configuring, let me know, but please read the documentation first, it will save us both a lot of time.