无法让Jquery插件运行幻灯片

时间:2015-08-04 21:31:51

标签: javascript jquery html

我一直试图让这个插件在我的网页上运行,但我无法弄清楚为什么它不起作用...任何帮助将不胜感激! (我包含了我在源文件夹中下载的插件中找到的所有文件)。

    

    <meta charset="UTF-8">

    <script src="\\ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
    <script src="jquery.bxslider.min.js"></script>
    <link href="jquery.bxslider.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="stylesheet.css"/>
    <script lang="javascript">
        $(document).ready(function () {
            $('.bxslider').bxSlider();
        });
    </script>
    <title>Stanley Cup Championships</title>
</head>
<body>
    <h1>Welcome to Stanely Cup Championships!</h1>
    <?php
    include 'header.php';
    ?>
    <p id="greeting">This is a website where you can find info about the team that won the stanely
        cup in any given year. The website is completely run by it's users, so sign up 
        and register your username and password in order to start inputting information 
        immediately! Have fun!</p>



    <ul class="bxslider">
        <li><img src="http://image.b4in.net/resources/2013/09/18/1379498716-Cup.jpg" /></li>
        <li><img src="https://upload.wikimedia.org/wikipedia/commons/2/25/First_Stanley_Cup.jpg" /></li>
        <li><img src="http://assets.dnainfo.com/generated/chicago_photo/2015/06/chicago-black-hawks-1938-1434298796.jpg/extralarge.jpg" /></li>
        <li><img src="https://i.embed.ly/1/display/resize?key=1e6a1a1efdb011df84894040444cdc60&url=http%3A%2F%2Fpbs.twimg.com%2Fmedia%2FBVGhOgWCUAADqif.jpg" /></li>
    </ul>
    <?php
    include 'footer.php';
    ?>
</body>

1 个答案:

答案 0 :(得分:0)

试试这个:调整你的javascript到

$('.bxslider').bxSlider({
  infiniteLoop: false,
  hideControlOnEnd: true
});

那是手册

自动使用

$('.bxslider').bxSlider({
  auto: true,
  autoControls: true
});