Modifications pour le document TestTransitions
Modifié par Paul Libbrecht le 2013/09/11 12:57
<
>
modifié par Paul Libbrecht (admin)
sur 2013/09/10 18:57
sur 2013/09/10 18:57
modifié par Paul Libbrecht (admin)
sur 2013/09/10 13:59
sur 2013/09/10 13:59
Commentaire de modification :
x
Résumé
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -1,64 +8,47 @@ 1 -{{velocity}} 2 -$xwiki.jsfx.use('js/scriptaculous/scriptaculous.js') 3 -$xwiki.jsfx.use('resources/js/amd/jquery-1.9.1.js') 4 -$xwiki.jsfx.use('js/jquery.innerfade/jquery.innerfade.js') 5 -$xwiki.ssx.use("js/jquery.innerfade/jq_fade.css") 6 -{{/velocity}} 7 - 8 8 {{html clean="false"}} 9 - $(document).ready( 10 - function(){ 11 - $('#news').innerfade({ 12 - animationtype: 'slide', 13 - speed: 750, 14 - timeout: 2000, 15 - type: 'random', 16 - containerheight: '1em' 17 - }); 18 18 19 - $('#portfolio').innerfade({20 - peed:'slow',21 - timeout:4000,22 - pe:'sequence',23 - containerheight: '220px'24 - });3 +<div style="height:500"> 4 +<div id="slideshow1" class="slide"><div><img src="/xwiki/bin/download/Louveteaux_Camp2013/Photos/DSC05093.JPG?width=300" width="300"></div></div> 5 +<div id="slideshow2" class="slide" style="display: none"><div><img src="/xwiki/bin/download/Louveteaux_Camp2013/Photos/DSC05093.JPG?width=300" width="300"></div></div> 6 +<div id="slideshow3" class="slide" style="display: none"><div><img src="/xwiki/bin/download/Louveteaux_Camp2013/Photos/DSC05019.JPG?width=300" width="300"></div></div> 7 +<div id="slideshow4" class="slide" style="display: none"><div><img src="/xwiki/bin/download/Louveteaux_Camp2013/Photos/DSC04972.JPG?width=300" width="300"></div></div> 8 +</div> 25 25 26 - $('.fade').innerfade({ 27 - speed: 'slow', 28 - timeout: 1000, 29 - type: 'sequence', 30 - containerheight: '1.5em' 31 - }); 32 - } 33 - ); 10 +<script type="text/javascript"> 11 + 12 + start_slideshow(1, 4, 2000); 13 + 14 + function start_slideshow(start_frame, end_frame, delay) { 15 + setTimeout(switch_slides(start_frame,start_frame,end_frame, delay), delay); 16 + } 17 + 18 + function switch_slides(frame, start_frame, end_frame, delay) { 19 + // return (function() { 20 + if (console) console.log("Switching."); 21 + Effect.Fade('slideshow' + frame); 22 + if (frame == end_frame) { frame = start_frame; } else { frame = frame + 1; } 23 + setTimeout("Effect.Appear('slideshow" + frame + "');", 850); 24 + setTimeout(switch_slides(frame, start_frame, end_frame, delay), delay + 850); 25 + // }) 26 + } 34 34 35 -}); 36 36 </script> 37 -<ul id="news"> 38 - <li> 39 - <a href="#n1">1 Lorem ipsum dolor</a> 40 - </li> 41 - <li> 42 - <a href="#n2">2 Sit amet, consectetuer</a> 43 - </li> 44 - <li> 45 - <a href="#n3">3 Sdipiscing elit,</a> 46 - </li> 47 - <li> 48 - <a href="#n4">4 sed diam nonummy nibh euismod tincidunt ut</a> 49 - </li> 50 - <li> 51 - <a href="#n5">5 Nec Lorem.</a> 52 - </li> 53 - <li> 54 - <a href="#n6">6 Et eget.</a> 55 - </li> 56 - <li> 57 - <a href="#n7">7 Leo orci pede.</a> 58 - </li> 59 - <li> 60 - <a href="#n8">8 Ratio randorus wil.</a> 61 - </li> 62 -</ul> 63 63 30 + 31 +div class="fadein"> 32 + <img src="http://farm3.static.flickr.com/2531/4121218751_ac8bf49d5d.jpg"> 33 + <img src="http://farm3.static.flickr.com/2597/4121218611_040cd7b3f2.jpg"> 34 + <img src="http://farm3.static.flickr.com/2610/4148988872_990b6da667.jpg"> 35 +</div> 36 + 37 +<script> 38 +setInterval(function(){ 39 + var imgs = $$('.fadein img'), 40 + visible = imgs.findAll(function(img){ return img.visible(); }); 41 + if(visible.length>1) visible.last().fade({ duration: .3 }); 42 + else imgs.last().appear({ duration: .3, 43 + afterFinish: function(){ imgs.slice(0,imgs.length-1).invoke('show'); } }); 44 +}, 3000); 45 +</script> 46 + 64 64 {{/html}}