View Full Version : background-image-carousel: seconde desc-container?

02-28-2012, 04:30 AM
1) Script Title: Background Image Carousel

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/bgcarousel.htm

3) Describe problem: Is there any chance to add a second description-container to this script?
what i tried to success:
- i added a second div.slide div.desc2 in the head-section
- i tried several things in the .js-file.

i think the important point in the script to change is this point:

+ ((imgref[1])? '<div class="desc" style="display:none">' + imgref[1] + '</div>\n' : '')
+ ((imgref[2])? '<div class="desc2" style="display:none">' + imgref[2] + '</div>\n' : '')
+ '</div>'

A pity I have no idea, what "imgref" does...

Thanks a lot for help in advance! :)

03-02-2012, 11:59 AM
Found the solution by myself.
But I have another question. Is it possible to link directly to one specific slide image? Somethink like this: www.url.com/#secondslide

Thanks for your help!

03-02-2012, 09:17 PM
schwiminator, try the below modified .js file, which should let you select a particular slide to show when the page loads if there's a hash tag in the URL in the form of:


Where int is a number from 0 onwards (0=1st slide, 1=2nd slide etc). More examples of valid hash tags:


Reload the page upon changing the hash tag to see the selected image change.

03-04-2012, 06:52 PM
Okay, thanks! But is there also a possibilty to get direct links - no hashs?
That I can just put a <a href=...> ?
Cause now you MUST reload the page....

03-07-2012, 10:11 AM
And another question:
I now have two desc-container. Is it possible that one hides after e.g. 2 seconds? I thought I only could add those jQuery-codes in the js-code in line 59:


And the same in line 117.

But that doesnt work. Any ideas? Thanks!