2012-10-25 49 views
0

我想實現在此http://www.smoothdivscroll.com/#quickdemo如何讓scrollinghotspot顯示

看到我的測試網站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" 
    }); 
}); 

回答

0

嗯,這很容易......我忘了鏈接到smoothscrolldiv.css ...所有現在罰款:)