eccovi una pagina di prova:
codice:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="Stylesheet" type="text/css" href="css/smoothDivScroll.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery.ui.widget.js"></script>
<script src="js/jquery.smoothDivScroll-1.1-min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("div#makeMeScrollable").smoothDivScroll({
autoScroll: "onstart",
autoScrollDirection: "backandforth",
autoScrollStep: 1,
autoScrollInterval: 15,
startAtElementId: "startAtMe",
visibleHotSpots: "always"
});
});
</script>
<style type="text/css">
#makeMeScrollable
{
width:100%;
height: 330px;
position: relative;
}
#makeMeScrollable div.scrollableArea *
{
position: relative;
float: left;
margin: 0;
padding: 0;
}
</style>
<title>Advertising</title>
</head>
<body>
<div id="makeMeScrollable">
<div class="scrollingHotSpotLeft"></div>
<div class="scrollingHotSpotRight"></div>
<div class="scrollWrapper">
<div class="scrollableArea">
<?php
$dirname = "../foto_marzia/adv";
$images = scandir($dirname);
sort($images);
foreach ($images as $file) {
if ((substr($file, -5) == ".jpeg") || (substr($file, -4) == ".jpg")) {
echo <<<HTML
[img]../foto_marzia/adv/$file[/img]
HTML;
}
}
?>
</div>
</div>
</div>
</body>
</html>
lo script php serve per mettere automaticamente tutte le immagini.
nn mi funziona con adblock attivato.