PDA

View Full Version : help for Carousel Slideshow



lyana
10-15-2011, 06:50 PM
http://www.dynamicdrive.com/dynamicindex14/carousel.htm
Hello all,I'm sorry, my English is not perfect, I would put the carousel in an article, but I do not understand step 3, if anyone can help me in simple English, thank you
Lyana

jscheuer1
10-15-2011, 08:18 PM
Actually, you should skip Step 2 and Step 3. And instead change the end of Step 1 from:


function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
function C_Rstrt(){C_Stppd=false}
</script>

<div id="Carousel" style="position:relative">
<img src="placeholder.gif" width="371" height="225">
</div>

<p><font face="Arial" size="-2">Free DHTML scripts provided by<br><a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

to:


function C_Stp(){this.style.cursor=this.lnk?"pointer":"default";C_Stppd=true;}
function C_Rstrt(){C_Stppd=false}
if (window.addEventListener){
window.addEventListener('load', Carousel, false);
}
else if (window.attachEvent){
window.attachEvent('onload', Carousel);
}
</script>

<div id="Carousel" style="position:relative;width:371px;height:225px;">

</div>

Set the width and height for the div according to the formula at the beginning of the script (here modified to reflect the above HTML and style changes):



div width:
4 sided: 1.42 * carousel image width + 3 + px
6 sided: 2 * carousel image width + 4 + px
8 sided: 2.62 * carousel image width + 5 + px
12 sided: 3.87 * carousel image width + 7 + px
div height:
carousel image height + 2 + px

lyana
10-16-2011, 06:25 PM
hello john , tank you for your help:)