0

我有一个包含来自我的数据库的内容的页面,但我希望能够显示这样的内容http://www.htmldrive.net/items/show/244/Amazon-style-image-and-title- scroller-with-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>
4

1 回答 1

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>
于 2013-06-01T23:15:25.817 回答