ここにある自動スクロール機能を実装しようとしています http://www.smoothdivscroll.com/#quickdemo
私のテストサイトhttp://hardis.synology.me/portalen/main.php?id=2
しかし、私は立ち往生していて、問題が何であるかを理解していません.これが私のコードです:
<div id="makeMeScrollable" class="main" >
<?php
$sql26 = "SELECT * FROM MCI ORDER BY Id_kund DESC"; // WHERE Id_kund desc Matningstyp ='$Matningstyp' AND/OR Affarsomrade ='$Affarsomrade' AND/OR Byra ='$Byra'
$result26 = mysql_query($sql26) or die (mysql_error());
while ($row26 = mysql_fetch_array($result26))
{
if($row26["Kampanj"] <= 20){
$star = 1;
}
elseif($row26["Kampanj"] <= 30){
$star = 2;
}
elseif($row26["Kampanj"] <= 40){
$star = 3;
}
elseif($row26["Kampanj"] <= 50){
$star = 4;
}
else{
$star = 5;
} $classname = ($first == $row26['Id']) ? 'focused' : 'normal';
echo "<div style=\"margin:5px 10px;\" data-produktkategori='{$row26[Produktkategori]}' data-id='{$row26[Id]}' class='abc $classname'><a class='infoXXXYYY' href='http://hardis.synology.me/portalen/main.php?id=2&scroll=".$row26[Id]."'><img src=\"foretag/Effectris/Presentationer/{$test}/".$row26["Matningsnamn"]."/enheter/1.png\" wIdth=\"150\" height=\"120\" style=\"position: relative;\">
<div style=\"background:black;opacity:0.6;width:150px;height:50px;position: absolute; bottom: 0; left: 0;\"></div>
<img src=\"img/stars/STARS2/3/$star.png\" style=\"position: absolute; bottom: 35px; left: 3px;width:70px;z-index:1111;\"> <H6 style=\"font-size:11px;color:white;position: absolute;bottom: 20px; left: 5px;z-index:3311;\">".date("M,Y", strtotime($row26['Datum_formatning']))."</H6>
<H6 style=\"font-size:11px;color:white;position: absolute;bottom: 5px; left: 5px;z-index:3311;\">".$row26['Kampanjnamn']."</H6>
<div class='mask'>
<h2 style=\"text-transform: uppercase;color: WHITE;width:120px;text-align: LEFT;position: relative;font-size: 15px;border-bottom: 1px solid rgba(0, 0, 0, 0.3);background: transparent;margin: 0px 10px;padding: 5px;\">".$row26["Matningsnamn"]."</h2>
<p>Kanal: <b>".$row26['Kanal']."</b></p>
<p>Intentionsförflyttning: <br \><b>".$row26['Nyfikenhet']." enheter</b> </p>
</div></a>
</div>";
} ;
?>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#makeMeScrollable").smoothDivScroll({
mousewheelScrolling: "allDirections",
manualContinuousScrolling: true,
autoScrollingMode: "onStart"
});
});