【问题标题】:JQUERY scroller contentJQUERY 滚动条内容
【发布时间】:2013-06-01 19:19:09
【问题描述】:

我有一个包含来自我的数据库的内容的页面,但我希望能够显示这样的内容 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>

【问题讨论】:

    标签: php javascript jquery customization


    【解决方案1】:

    示例代码将每个项目(链接 + 图像)放在 &lt;li&gt; 中,而您的代码将所有项目放在同一个 &lt;li&gt; 中。试试:

    <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>
    

    【讨论】:

    • 我注意到没有像#amazon_scroller1这样的css脚本
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-02
    • 1970-01-01
    • 2015-08-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多