Code source wiki de TestTransitions
Version 32.5 par Paul Libbrecht le 2013/09/11 21:48
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 | |||
11 | blablablla | ||
12 | <div style="height:300px; width:300px; float:right"> | ||
13 | <div id="slideshow1" class="slide"><div><img src="http://scouts.forbach.fr/xwiki/bin/download/Bleus_Camp2013/WebHome/P7270061.JPG?width=200"></div></div> | ||
14 | <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> | ||
15 | <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> | ||
16 | <div id="slideshow4" class="slide" style="display: none"><div>frame 4</div></div> | ||
17 | </div> | ||
18 | <script type="text/javascript"> | ||
19 | |||
20 | start_slideshow(1, 4, 2000); | ||
21 | |||
22 | function start_slideshow(start_frame, end_frame, delay) { | ||
23 | setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay); | ||
24 | } | ||
25 | |||
26 | function switch_slides(frame, start_frame, end_frame, delay) { | ||
27 | return (function() { | ||
28 | Effect.Fade('slideshow' + frame); | ||
29 | if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; } | ||
30 | setTimeout("Effect.Appear('slideshow" + frame + "');", 850); | ||
31 | setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850); | ||
32 | }) | ||
33 | } | ||
34 | |||
35 | </script> | ||
36 | {{/html}} |