2013-06-01 139 views
0

我有,從我的數據庫來內容的頁面,但我希望能夠表現出這樣的http://www.htmldrive.net/items/show/244/Amazon-style-image-and-title-scroller-with-jQuery我已經下載了劇本,我沒有(我認爲)之類的教程內容,但它是根本不工作。我確定我在做一些愚蠢的事情,但我不知道是什麼。JQUERY滾動內容

<link href="css/amazon_scroller.css" rel="stylesheet" type="text/css"></link> 
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script> 
<script type="text/javascript" src="js/amazon_scroller.js"></script> 


<script language="javascript" type="text/javascript"> 
     $(function() { 
      $("#amazon_scroller").amazon_scroller({ 
       scroller_title_show: 'enable', 
       scroller_time_interval: '0', 
       scroller_window_background_color: "#CCC", 
       scroller_window_padding: '10', 
       scroller_border_size: '1', 
       scroller_border_color: '#000', 
       scroller_images_width: '150', 
       scroller_images_height: '100', 
       scroller_title_size: '12', 
       scroller_title_color: 'black', 
       scroller_show_count: '2', 
       directory: 'images' 
      }); 
     }); 
    </script> 

<div id="amazon_scroller1" class="amazon_scroller"> 

<div class="amazon_scroller"> 
     <div class="amazon_scroller_mask"> 
      <ul> 

<li> 
<?php do { ?> 

<div align="center" id="thumb"><a href="legendofgames/gameview.php?recordID=<?php echo $row_GameData['idGames']; ?>"><img src="../legendofgames/documentos/games/<?php echo $row_GameData['strImage']; ?>" width="165" height="120"/></a> 
<div align="center" id="gametext"><?php echo $row_GameData['strNome']; ?> </div> 
</div> 


<?php } while ($row_GameData = mysql_fetch_assoc($GameData)); ?> 
</div> 

</li> 
</ul> 
     </div> 
     <ul class="amazon_scroller_nav"> 
      <li></li> 
      <li></li> 
     </ul> 
     <div style="clear: both"></div> 
    </div> 

回答

0

的示例代碼把每個項目(鏈接+圖像)在<li>而你的代碼將所有項目在同一<li>。嘗試:

<div id="amazon_scroller1" class="amazon_scroller"> 

<div class="amazon_scrolle r"> 
<div class="amazon_scroller_mask"> 

<ul> 
<?php do { ?> 
<li> 
<div align="center" id="thumb"><a href="legendofgames/gameview.php?recordID=<?php echo $row_GameData['idGames']; ?>"><img src="../legendofgames/documentos/games/<?php echo $row_GameData['strImage']; ?>" width="165" height="120"/></a> 
<div align="center" id="gametext"><?php echo $row_GameData['strNome']; ?> </div> 
</div> 
</li> 
<?php } while ($row_GameData = mysql_fetch_assoc($GameData)); ?> 



</ul> 
</div> 
</div> 
     <ul class="amazon_scroller_nav"> 
      <li></li> 
      <li></li> 
     </ul> 
     <div style="clear: both"></div> 
</div> 
+0

它沒有工作要麼 – John

+0

我注意到沒有css腳本,如#amazon_scroller1 – John