Hi, I'm a newbie to scriptaculous and prototype. I am trying to create a slideshow using multiple slides. I am creating multiple child divs within a parent div using javascript. Next, I am trying to show the content of these child divs as a slideshow. I am using Effect.Appear() and Effect.Fade() functions to create this slideshow. It is working fine, when I am showing one slide at a time. But what I need is to show multiple slides at a time and the slides should move in a cyclic manner. the code snippet I have used is as follows -
// Javascript code - <script type="text/javascript"> function add_Div(){ var arrlength = 5; for(var i=0;i<arrlength;i++){ var newdiv = document.createElement('div'); newdiv.setAttribute('id', 'childdiv'+i); newdiv.innerHTML = "This is new div"+i; mainDiv.appendChild(newdiv); } } var Slides = new Array("childdiv0","childdiv1","childdiv2","childdiv3","childdiv4"); var wait = 3000; var i = 0; function start_slideshow() { add_Div(); setInterval("SlideShow()", wait); . } function SlideShow() { Effect.Fade(Slides[i], { duration:1, from:1.0, to:0.0 }); i++; if (i > 4) i = 0; Effect.Appear(Slides[i], { duration:1, from:0.0, to: 1.0 }); } </script> // HTML code - <body onload="start_slideshow()"> <div id="mainDiv"></div> </body> Any idea as to how to implement this would be of great help. Thanks, Amitava. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.