0

Trying to make a slideshow with bootstrap. However the image doesnt change when I click the navigation buttons.

The first image is displayed correctly and the navigation buttons are visible.

    <html lang=“en”&gt;
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>About</title>

    <!-- Bootstrap -->
        <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="css/bootstrap-responsive.css" rel="stylesheet">
    </head>
    <body>

    <div class="row-fluid">
        <div class="span12">
            <div class="container">
                <div id="this-carousel-id" class="carousel slide">
                    <div class="carousel-inner">
                        <div class="item active">
                            <img src="http://foto.qaz.dk/malta2013/DSC02744_v1.jpg" alt="Birdie" />
                        </div>
                        <div class="item">
                            <img src="http://foto.qaz.dk/malta2013/DSC02834_v1.jpg" alt="phone" />
                        </div>
                    </div>
                    <a class="carousel-control left" href="#this-carousel-id" data-slide="prev">&lsaquo;</a>
                    <a class="carousel-control right" href="#this-carousel-id" data-slide="next">&rsaquo;</a>
                </div>
            </div>
        </div>
    </div>
    <!-- end carousel -->

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script>window.jQuery || document.write('<script src="js/jquery-1.7.2.min.js"><\/script>')</script>
    <!-- Bootstrap jQuery plugins compiled and minified -->
    <script src="js/bootstrap.min.js"></script>
    </body>

    </html>
4

1 回答 1

1

首先,有几个语法问题:

你需要一个http:之前//ajax.google...

而且我很确定这个反斜杠不应该在那里:<\/script>

然后,检查您的源以确保正确链接 jquery。

于 2013-09-12T15:22:37.233 回答