1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| <DOCTYPE! html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<!--Script JQuery du Slider-->
<script type="text/javascript">
$(function(){
setInterval(function(){
$(".slideshow ul").animate({marginLeft:-350},800,function(){
$(this).css({marginLeft:0}).find("li:last").after($(this).find("li:first"));
})
}, 3500);
});
</script><!-- Fin du Script -->
</head>
<body>
<!-- Récuperer toute les images du dossier courant avec un ".jpg"--><!-- Essayer d'afficher toutes les images dans le slider -->
<div class='slideshow'>
<ul>
<?php
$types = '*.{gif,jpg,jpeg,png}';
foreach (glob($types , GLOB_BRACE) as $filename) { ?>
<li>
<img src="<?= $filename; ?>">
</li>
<?php }?>
</ul>
</div
</body>
</html> |
Partager