PDA

View Full Version : 3D Cube Slideshow-Add Description to each image in rotation



Flyswatter
07-31-2015, 03:17 AM
1) Script Title: 3D Cube Slideshow

2) Script URL (on DD): http://www.javascriptkit.com/script/script2/cubeslideshow.shtml

3) Describe problem: I would like to add a description to each image. I have them hyperlinked but need each image to display details about itself. I'd also like to pause the slides on mouseover.

(I'm a bit confused as to why javakit.com Forums button sent me to dynamicdrive forums, if I'm in the wrong place, let me know)

ddadmin
08-01-2015, 07:21 AM
I'll take a stab sometime this weekend on modifying the script to support a description. No guarantees :)

Flyswatter
08-01-2015, 07:33 AM
Thank you! If you get to it great! if not, keep me in mind :)

ddadmin
08-02-2015, 07:25 AM
Ok, please try the below modified .js file. Then in your initialization code, make use of the new "desc" option to specify corresponding text descriptions for each slide:


<script>

var cubeshowvar1 // arbitrary but unique variable to store slideshow instance

jQuery(function($){
cubeshowvar1 = new jkcubeslideshow({
id: 'cubeshow1',
dimensions: [300, 385],
pause: 1000,
desc: ['this is food1.jpg', 'this is food2.jpg', 'this is food3.jpg'],
images: [
['food1.jpg'],
['food2.jpg'],
['food3.jpg'],
['food4.jpg'],
['food5.jpg'] //<-- no comma after last image
] //<-- no comma after last setting
})
})

</script>

You will also want to increase the height of the slideshow so it can accommodate the text descriptions. The modified .js file also pauses the slideshow onmouseover.

Flyswatter
08-02-2015, 10:47 AM
Thank you! This works well.