Code source wiki de TestTransitions
Version 32.1 par Paul Libbrecht le 2013/09/11 21:44
Afficher les derniers auteurs
author | version | line-number | content |
---|---|---|---|
1 | {{velocity}} | ||
2 | #* $xwiki.jsfx.use('js/scriptaculous/scriptaculous.js') | ||
3 | $xwiki.jsfx.use('js/scriptaculous/effects.js') | ||
4 | $xwiki.jsfx.use('js/protoshow/protoshow.js') | ||
5 | ## $xwiki.ssx.use('js/protoshow/protoshow.css') | ||
6 | *# | ||
7 | {{/velocity}} | ||
8 | |||
9 | {{html clean="false"}} | ||
10 | <div id="slideshow1" class="slide" style="height:200; width:200"><div><img src="http://scouts.forbach.fr/xwiki/bin/download/Bleus_Camp2013/WebHome/P7270061.JPG?width=200"></div></div> | ||
11 | <div id="slideshow2" class="slide" style="display: none"><div><img src="http://scouts.forbach.fr/xwiki/bin/download/Bleus_Camp2013/WebHome/P7270062.JPG?width=200"></div></div> | ||
12 | <div id="slideshow3" class="slide" style="display: none"><div><img src="http://scouts.forbach.fr/xwiki/bin/download/Bleus_Camp2013/WebHome/P7270060.JPG?width=200"></div></div> | ||
13 | <div id="slideshow4" class="slide" style="display: none"><div>frame 4</div></div> | ||
14 | |||
15 | <script type="text/javascript"> | ||
16 | |||
17 | start_slideshow(1, 4, 2000); | ||
18 | |||
19 | function start_slideshow(start_frame, end_frame, delay) { | ||
20 | setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay); | ||
21 | } | ||
22 | |||
23 | function switch_slides(frame, start_frame, end_frame, delay) { | ||
24 | return (function() { | ||
25 | Effect.Fade('slideshow' + frame); | ||
26 | if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; } | ||
27 | setTimeout("Effect.Appear('slideshow" + frame + "');", 850); | ||
28 | setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850); | ||
29 | }) | ||
30 | } | ||
31 | |||
32 | </script> | ||
33 | {{/html}} |